mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
fix(amis-editor-core): 构建发版时注入当前版本号信息
This commit is contained in:
parent
754490857d
commit
1f172ab887
@ -22,6 +22,7 @@ import minify from 'postcss-minify';
|
||||
import autoprefixer from 'autoprefixer';
|
||||
import {terser} from 'rollup-plugin-terser';
|
||||
import postcss from 'rollup-plugin-postcss';
|
||||
import replace from '@rollup/plugin-replace';
|
||||
const cssUrl = require('postcss-url');
|
||||
const i18nConfig = require('./i18nConfig');
|
||||
|
||||
@ -149,6 +150,10 @@ function getPlugins(format = 'esm') {
|
||||
jsnext: true,
|
||||
main: true
|
||||
}),
|
||||
replace({
|
||||
preventAssignment: true,
|
||||
__buildVersion: version
|
||||
}),
|
||||
commonjs({
|
||||
sourceMap: false
|
||||
}),
|
||||
|
@ -37,6 +37,8 @@ import {AvailableRenderersPlugin} from './plugin/AvailableRenderers';
|
||||
import ShortcutKey from './component/base/ShortcutKey';
|
||||
import WidthDraggableContainer from './component/base/WidthDraggableContainer';
|
||||
|
||||
export const version = '__buildVersion';
|
||||
|
||||
export default Editor;
|
||||
|
||||
export {
|
||||
|
Loading…
Reference in New Issue
Block a user