fix(amis-editor-core): 构建发版时注入当前版本号信息

This commit is contained in:
wibetter 2023-09-26 20:04:28 +08:00
parent 754490857d
commit 1f172ab887
2 changed files with 7 additions and 0 deletions

View File

@ -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
}),

View File

@ -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 {