@chamn/engine 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component/CSSEditor/index.d.ts +16 -0
- package/dist/component/CSSPropertiesEditor/cssProperties.d.ts +898 -0
- package/dist/component/CSSPropertiesEditor/index.d.ts +43 -0
- package/dist/component/CSSPropertiesEditor/util.d.ts +1 -0
- package/dist/component/CSSPropertiesVariableBindEditor/cssProperties.d.ts +898 -0
- package/dist/component/CSSPropertiesVariableBindEditor/index.d.ts +37 -0
- package/dist/component/CSSPropertiesVariableBindEditor/util.d.ts +1 -0
- package/dist/component/ClassNameEditor/index.d.ts +16 -0
- package/dist/component/CustomSchemaForm/components/Form/Field/index.d.ts +11 -0
- package/dist/component/CustomSchemaForm/components/Form/context.d.ts +12 -0
- package/dist/component/CustomSchemaForm/components/Form/index.d.ts +18 -0
- package/dist/component/CustomSchemaForm/components/SetterSwitcher/index.d.ts +14 -0
- package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/ArrayItem.d.ts +11 -0
- package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/SortItemOrderModal.d.ts +10 -0
- package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/index.d.ts +14 -0
- package/dist/component/CustomSchemaForm/components/Setters/BooleanSetter/index.d.ts +5 -0
- package/dist/component/CustomSchemaForm/components/Setters/CSSValueSetter/index.d.ts +6 -0
- package/dist/component/CustomSchemaForm/components/Setters/ExpressionSetter/index.d.ts +8 -0
- package/dist/component/CustomSchemaForm/components/Setters/FunctionSetter/defaultDts.d.ts +1 -0
- package/dist/component/CustomSchemaForm/components/Setters/FunctionSetter/index.d.ts +2 -0
- package/dist/component/CustomSchemaForm/components/Setters/JSONSetter/index.d.ts +2 -0
- package/dist/component/CustomSchemaForm/components/Setters/NumberSetter/index.d.ts +3 -0
- package/dist/component/CustomSchemaForm/components/Setters/SelectSetter/index.d.ts +3 -0
- package/dist/component/CustomSchemaForm/components/Setters/ShapeSetter/index.d.ts +8 -0
- package/dist/component/CustomSchemaForm/components/Setters/StringSetter/index.d.ts +3 -0
- package/dist/component/CustomSchemaForm/components/Setters/TextAreaSetter/index.d.ts +3 -0
- package/dist/component/CustomSchemaForm/components/Setters/index.d.ts +3 -0
- package/dist/component/CustomSchemaForm/components/Setters/type.d.ts +19 -0
- package/dist/component/CustomSchemaForm/context.d.ts +15 -0
- package/dist/component/CustomSchemaForm/index.d.ts +20 -0
- package/dist/component/CustomSchemaForm/utils.d.ts +2 -0
- package/dist/component/MonacoEditor/index.d.ts +15 -0
- package/dist/component/Workbench/index.d.ts +61 -0
- package/dist/core/pluginManager.d.ts +61 -0
- package/dist/i18n/en_US/index.d.ts +5 -0
- package/dist/i18n/index.d.ts +6 -0
- package/dist/i18n/zh_CN/index.d.ts +5 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.js +197 -0
- package/dist/index.js.map +1 -0
- package/dist/{index.es.js → index.mjs} +6867 -6541
- package/dist/index.mjs.map +1 -0
- package/dist/material/innerMaterial.d.ts +2 -0
- package/dist/plugins/AdvancePanel/index.d.ts +10 -0
- package/dist/plugins/ComponentLibrary/components/DragItem/index.d.ts +12 -0
- package/dist/plugins/ComponentLibrary/components/ListView/index.d.ts +9 -0
- package/dist/plugins/ComponentLibrary/index.d.ts +3 -0
- package/dist/plugins/ComponentLibrary/localize/en_US/index.d.ts +1 -0
- package/dist/plugins/ComponentLibrary/localize/index.d.ts +2 -0
- package/dist/plugins/ComponentLibrary/localize/zh_CN/index.d.ts +1 -0
- package/dist/plugins/ComponentLibrary/util.d.ts +1 -0
- package/dist/plugins/ComponentStatePanel/index.d.ts +10 -0
- package/dist/plugins/Designer/components/DefaultSelectToolBar/index.d.ts +10 -0
- package/dist/plugins/Designer/components/GhostView/index.d.ts +5 -0
- package/dist/plugins/Designer/config.d.ts +1 -0
- package/dist/plugins/Designer/index.d.ts +15 -0
- package/dist/plugins/Designer/localize/en_US/index.d.ts +1 -0
- package/dist/plugins/Designer/localize/index.d.ts +2 -0
- package/dist/plugins/Designer/localize/zh_CN/index.d.ts +1 -0
- package/dist/plugins/Designer/util.d.ts +2 -0
- package/dist/plugins/Designer/view.d.ts +30 -0
- package/dist/plugins/DisplaySourceSchema/index.d.ts +9 -0
- package/dist/plugins/GlobalStatePanel/index.d.ts +3 -0
- package/dist/plugins/GlobalStatePanel/localize/en_US/index.d.ts +1 -0
- package/dist/plugins/GlobalStatePanel/localize/index.d.ts +2 -0
- package/dist/plugins/GlobalStatePanel/localize/zh_CN/index.d.ts +1 -0
- package/dist/plugins/History/index.d.ts +2 -0
- package/dist/plugins/OutlineTree/components/TreeView/context.d.ts +30 -0
- package/dist/plugins/OutlineTree/components/TreeView/dataStruct.d.ts +21 -0
- package/dist/plugins/OutlineTree/components/TreeView/index.d.ts +34 -0
- package/dist/plugins/OutlineTree/components/TreeView/treeNode.d.ts +9 -0
- package/dist/plugins/OutlineTree/index.d.ts +3 -0
- package/dist/plugins/OutlineTree/localize/en_US/index.d.ts +1 -0
- package/dist/plugins/OutlineTree/localize/index.d.ts +2 -0
- package/dist/plugins/OutlineTree/localize/zh_CN/index.d.ts +1 -0
- package/dist/plugins/OutlineTree/util.d.ts +15 -0
- package/dist/plugins/PropertyPanel/index.d.ts +9 -0
- package/dist/plugins/RightPanel/index.d.ts +2 -0
- package/dist/plugins/RightPanel/view.d.ts +38 -0
- package/dist/plugins/VisualPanelPlus/index.d.ts +9 -0
- package/dist/plugins/index.d.ts +9 -0
- package/dist/utils/css.d.ts +19 -0
- package/dist/utils/defaultEngineConfig.d.ts +5 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/logger.d.ts +1 -0
- package/package.json +12 -9
- package/.eslintignore +0 -1
- package/.eslintrc.js +0 -36
- package/.prettierrc.json +0 -7
- package/.storybook/main.js +0 -24
- package/.storybook/preview.js +0 -9
- package/CHANGELOG.md +0 -50
- package/__tests__/demo.test.ts +0 -3
- package/build.config.js +0 -88
- package/dist/index.cjs.js +0 -197
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.es.js.map +0 -1
- package/index.html +0 -16
- package/jest.config.js +0 -196
- package/public/_dev_/render.d.ts +0 -2
- package/public/render.umd.js +0 -42
- package/public/render.umd.js.map +0 -1
- package/src/Engine.module.scss +0 -10
- package/src/Engine.module.scss.d.ts +0 -5
- package/src/_dev_/index.css +0 -22
- package/src/_dev_/index.tsx +0 -5
- package/src/_dev_/page/Editor/index.tsx +0 -198
- package/src/_dev_/page/Editor/indexCustom.tsx +0 -274
- package/src/_dev_/page/Preview/index.tsx +0 -56
- package/src/_dev_/render.ts +0 -3
- package/src/_dev_/router.tsx +0 -14
- package/src/assets/react.svg +0 -4
- package/src/assets/styles/mixin.scss +0 -15
- package/src/component/CSSEditor/index.tsx +0 -247
- package/src/component/CSSEditor/style.module.scss +0 -22
- package/src/component/CSSEditor/style.module.scss.d.ts +0 -6
- package/src/component/CSSPropertiesEditor/cssProperties.ts +0 -1062
- package/src/component/CSSPropertiesEditor/index.tsx +0 -389
- package/src/component/CSSPropertiesEditor/style.module.scss +0 -46
- package/src/component/CSSPropertiesEditor/style.module.scss.d.ts +0 -15
- package/src/component/CSSPropertiesEditor/util.ts +0 -19
- package/src/component/CSSPropertiesVariableBindEditor/cssProperties.ts +0 -782
- package/src/component/CSSPropertiesVariableBindEditor/index.tsx +0 -366
- package/src/component/CSSPropertiesVariableBindEditor/style.module.scss +0 -48
- package/src/component/CSSPropertiesVariableBindEditor/style.module.scss.d.ts +0 -15
- package/src/component/CSSPropertiesVariableBindEditor/util.ts +0 -19
- package/src/component/ClassNameEditor/index.tsx +0 -91
- package/src/component/ClassNameEditor/style.module.scss +0 -0
- package/src/component/CustomSchemaForm/components/Form/Field/index.tsx +0 -81
- package/src/component/CustomSchemaForm/components/Form/Field/style.module.scss +0 -32
- package/src/component/CustomSchemaForm/components/Form/Field/style.module.scss.d.ts +0 -8
- package/src/component/CustomSchemaForm/components/Form/context.ts +0 -23
- package/src/component/CustomSchemaForm/components/Form/index.tsx +0 -71
- package/src/component/CustomSchemaForm/components/SetterSwitcher/index.tsx +0 -273
- package/src/component/CustomSchemaForm/components/SetterSwitcher/style.module.scss +0 -16
- package/src/component/CustomSchemaForm/components/SetterSwitcher/style.module.scss.d.ts +0 -7
- package/src/component/CustomSchemaForm/components/Setters/ArraySetter/ArrayItem.tsx +0 -55
- package/src/component/CustomSchemaForm/components/Setters/ArraySetter/SortItemOrderModal.tsx +0 -160
- package/src/component/CustomSchemaForm/components/Setters/ArraySetter/index.tsx +0 -129
- package/src/component/CustomSchemaForm/components/Setters/ArraySetter/style.module.scss +0 -22
- package/src/component/CustomSchemaForm/components/Setters/ArraySetter/style.module.scss.d.ts +0 -7
- package/src/component/CustomSchemaForm/components/Setters/BooleanSetter/index.tsx +0 -32
- package/src/component/CustomSchemaForm/components/Setters/CSSValueSetter/index.tsx +0 -78
- package/src/component/CustomSchemaForm/components/Setters/CSSValueSetter/style.module.scss +0 -7
- package/src/component/CustomSchemaForm/components/Setters/CSSValueSetter/style.module.scss.d.ts +0 -6
- package/src/component/CustomSchemaForm/components/Setters/ExpressionSetter/index.tsx +0 -47
- package/src/component/CustomSchemaForm/components/Setters/FunctionSetter/defaultDts.ts +0 -28
- package/src/component/CustomSchemaForm/components/Setters/FunctionSetter/index.tsx +0 -93
- package/src/component/CustomSchemaForm/components/Setters/JSONSetter/index.tsx +0 -80
- package/src/component/CustomSchemaForm/components/Setters/NumberSetter/index.tsx +0 -34
- package/src/component/CustomSchemaForm/components/Setters/SelectSetter/index.tsx +0 -35
- package/src/component/CustomSchemaForm/components/Setters/ShapeSetter/index.tsx +0 -65
- package/src/component/CustomSchemaForm/components/Setters/StringSetter/index.tsx +0 -30
- package/src/component/CustomSchemaForm/components/Setters/TextAreaSetter/index.tsx +0 -31
- package/src/component/CustomSchemaForm/components/Setters/index.ts +0 -26
- package/src/component/CustomSchemaForm/components/Setters/type.ts +0 -18
- package/src/component/CustomSchemaForm/context.ts +0 -20
- package/src/component/CustomSchemaForm/index.tsx +0 -93
- package/src/component/CustomSchemaForm/style.module.scss +0 -15
- package/src/component/CustomSchemaForm/style.module.scss.d.ts +0 -11
- package/src/component/CustomSchemaForm/utils.ts +0 -13
- package/src/component/MonacoEditor/index.tsx +0 -81
- package/src/component/Workbench/index.tsx +0 -329
- package/src/component/Workbench/style.module.scss +0 -159
- package/src/component/Workbench/style.module.scss.d.ts +0 -25
- package/src/core/pluginManager.ts +0 -151
- package/src/i18n/en_US/index.ts +0 -5
- package/src/i18n/index.ts +0 -39
- package/src/i18n/zh_CN/index.ts +0 -5
- package/src/index.tsx +0 -150
- package/src/material/innerMaterial.ts +0 -343
- package/src/plugins/AdvancePanel/index.tsx +0 -191
- package/src/plugins/AdvancePanel/style.module.scss +0 -8
- package/src/plugins/AdvancePanel/style.module.scss.d.ts +0 -7
- package/src/plugins/ComponentLibrary/components/DragItem/index.tsx +0 -65
- package/src/plugins/ComponentLibrary/components/DragItem/style.module.scss +0 -58
- package/src/plugins/ComponentLibrary/components/DragItem/style.module.scss.d.ts +0 -9
- package/src/plugins/ComponentLibrary/components/ListView/index.tsx +0 -50
- package/src/plugins/ComponentLibrary/components/ListView/style.module.scss +0 -27
- package/src/plugins/ComponentLibrary/components/ListView/style.module.scss.d.ts +0 -12
- package/src/plugins/ComponentLibrary/index.tsx +0 -184
- package/src/plugins/ComponentLibrary/localize/en_US/index.ts +0 -3
- package/src/plugins/ComponentLibrary/localize/index.ts +0 -3
- package/src/plugins/ComponentLibrary/localize/zh_CN/index.ts +0 -3
- package/src/plugins/ComponentLibrary/style.module.scss +0 -31
- package/src/plugins/ComponentLibrary/style.module.scss.d.ts +0 -11
- package/src/plugins/ComponentLibrary/util.ts +0 -14
- package/src/plugins/ComponentStatePanel/index.tsx +0 -59
- package/src/plugins/Designer/components/DefaultSelectToolBar/index.tsx +0 -94
- package/src/plugins/Designer/components/DefaultSelectToolBar/style.module.scss +0 -59
- package/src/plugins/Designer/components/DefaultSelectToolBar/style.module.scss.d.ts +0 -11
- package/src/plugins/Designer/components/GhostView/index.tsx +0 -18
- package/src/plugins/Designer/config.ts +0 -1
- package/src/plugins/Designer/index.tsx +0 -61
- package/src/plugins/Designer/localize/en_US/index.ts +0 -3
- package/src/plugins/Designer/localize/index.ts +0 -3
- package/src/plugins/Designer/localize/zh_CN/index.ts +0 -3
- package/src/plugins/Designer/style.module.scss +0 -10
- package/src/plugins/Designer/style.module.scss.d.ts +0 -5
- package/src/plugins/Designer/util.ts +0 -18
- package/src/plugins/Designer/view.tsx +0 -225
- package/src/plugins/DisplaySourceSchema/index.tsx +0 -76
- package/src/plugins/GlobalStatePanel/index.tsx +0 -96
- package/src/plugins/GlobalStatePanel/localize/en_US/index.ts +0 -3
- package/src/plugins/GlobalStatePanel/localize/index.ts +0 -3
- package/src/plugins/GlobalStatePanel/localize/zh_CN/index.ts +0 -3
- package/src/plugins/GlobalStatePanel/style.module.scss +0 -8
- package/src/plugins/GlobalStatePanel/style.module.scss.d.ts +0 -5
- package/src/plugins/History/index.tsx +0 -110
- package/src/plugins/OutlineTree/components/TreeView/context.ts +0 -43
- package/src/plugins/OutlineTree/components/TreeView/dataStruct.ts +0 -58
- package/src/plugins/OutlineTree/components/TreeView/index.tsx +0 -376
- package/src/plugins/OutlineTree/components/TreeView/style.module.scss +0 -93
- package/src/plugins/OutlineTree/components/TreeView/style.module.scss.d.ts +0 -16
- package/src/plugins/OutlineTree/components/TreeView/treeNode.tsx +0 -271
- package/src/plugins/OutlineTree/index.tsx +0 -39
- package/src/plugins/OutlineTree/localize/en_US/index.ts +0 -3
- package/src/plugins/OutlineTree/localize/index.ts +0 -3
- package/src/plugins/OutlineTree/localize/zh_CN/index.ts +0 -3
- package/src/plugins/OutlineTree/util.tsx +0 -302
- package/src/plugins/PropertyPanel/index.tsx +0 -63
- package/src/plugins/PropertyPanel/style.module.scss +0 -12
- package/src/plugins/PropertyPanel/style.module.scss.d.ts +0 -10
- package/src/plugins/PropertyPanel/utils.ts +0 -13
- package/src/plugins/RightPanel/index.tsx +0 -30
- package/src/plugins/RightPanel/style.module.scss +0 -16
- package/src/plugins/RightPanel/style.module.scss.d.ts +0 -10
- package/src/plugins/RightPanel/view.tsx +0 -177
- package/src/plugins/VisualPanel/index.tsx +0 -185
- package/src/plugins/VisualPanel/style.module.scss +0 -17
- package/src/plugins/VisualPanelPlus/index.tsx +0 -103
- package/src/plugins/VisualPanelPlus/style.module.scss +0 -20
- package/src/plugins/VisualPanelPlus/style.module.scss.d.ts +0 -10
- package/src/plugins/index.tsx +0 -26
- package/src/stories/Button.jsx +0 -50
- package/src/stories/Button.stories.jsx +0 -40
- package/src/stories/Introduction.stories.mdx +0 -194
- package/src/stories/assets/code-brackets.svg +0 -1
- package/src/stories/assets/colors.svg +0 -1
- package/src/stories/assets/comments.svg +0 -1
- package/src/stories/assets/direction.svg +0 -1
- package/src/stories/assets/flow.svg +0 -1
- package/src/stories/assets/plugin.svg +0 -1
- package/src/stories/assets/repo.svg +0 -1
- package/src/stories/assets/stackalt.svg +0 -1
- package/src/stories/button.css +0 -30
- package/src/stories/plugins/CSSEditor.stories.tsx +0 -75
- package/src/stories/plugins/VisualPanelPlus.stories.tsx +0 -74
- package/src/style.d.ts +0 -2
- package/src/typing.d.ts +0 -9
- package/src/utils/css.ts +0 -88
- package/src/utils/defaultEngineConfig.tsx +0 -55
- package/src/utils/index.ts +0 -12
- package/src/utils/logger.ts +0 -4
- package/src/vite-env.d.ts +0 -1
- package/tsconfig.json +0 -32
- /package/{public → dist}/Engine.module.scss.d.ts +0 -0
- /package/{public → dist}/component/CSSEditor/style.module.scss.d.ts +0 -0
- /package/{public → dist}/component/CSSPropertiesEditor/style.module.scss.d.ts +0 -0
- /package/{public → dist}/component/CSSPropertiesVariableBindEditor/style.module.scss.d.ts +0 -0
- /package/{public → dist}/component/CustomSchemaForm/components/Form/Field/style.module.scss.d.ts +0 -0
- /package/{public → dist}/component/CustomSchemaForm/components/SetterSwitcher/style.module.scss.d.ts +0 -0
- /package/{public → dist}/component/CustomSchemaForm/components/Setters/ArraySetter/style.module.scss.d.ts +0 -0
- /package/{public → dist}/component/CustomSchemaForm/components/Setters/CSSValueSetter/style.module.scss.d.ts +0 -0
- /package/{public → dist}/component/CustomSchemaForm/style.module.scss.d.ts +0 -0
- /package/{public → dist}/component/Workbench/style.module.scss.d.ts +0 -0
- /package/{public → dist}/plugins/AdvancePanel/style.module.scss.d.ts +0 -0
- /package/{public → dist}/plugins/ComponentLibrary/components/DragItem/style.module.scss.d.ts +0 -0
- /package/{public → dist}/plugins/ComponentLibrary/components/ListView/style.module.scss.d.ts +0 -0
- /package/{public → dist}/plugins/ComponentLibrary/style.module.scss.d.ts +0 -0
- /package/{public → dist}/plugins/Designer/components/DefaultSelectToolBar/style.module.scss.d.ts +0 -0
- /package/{public → dist}/plugins/Designer/style.module.scss.d.ts +0 -0
- /package/{public → dist}/plugins/GlobalStatePanel/style.module.scss.d.ts +0 -0
- /package/{public → dist}/plugins/OutlineTree/components/TreeView/style.module.scss.d.ts +0 -0
- /package/{public → dist}/plugins/PropertyPanel/style.module.scss.d.ts +0 -0
- /package/{public → dist}/plugins/RightPanel/style.module.scss.d.ts +0 -0
- /package/{public → dist}/plugins/VisualPanelPlus/style.module.scss.d.ts +0 -0
package/build.config.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
-
/* eslint-disable no-undef */
|
|
3
|
-
|
|
4
|
-
const path = require('path');
|
|
5
|
-
const { visualizer } = require('rollup-plugin-visualizer');
|
|
6
|
-
const monacoEditorPlugin = require('vite-plugin-monaco-editor').default;
|
|
7
|
-
|
|
8
|
-
// 开发模式默认读取 index.html 作为开发模式入口
|
|
9
|
-
// entry 作为打包库入口
|
|
10
|
-
const plugins = [];
|
|
11
|
-
|
|
12
|
-
if (process.env.ANALYZE) {
|
|
13
|
-
plugins.push(
|
|
14
|
-
visualizer({
|
|
15
|
-
open: true,
|
|
16
|
-
emitFile: false,
|
|
17
|
-
gzipSize: true,
|
|
18
|
-
brotliSize: true,
|
|
19
|
-
})
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if (process.env.BUILD_TYPE !== 'PKG') {
|
|
24
|
-
plugins.push(
|
|
25
|
-
monacoEditorPlugin({
|
|
26
|
-
customDistPath: (root, buildOutDir) => {
|
|
27
|
-
console.log(111, root, buildOutDir);
|
|
28
|
-
return path.resolve(__dirname, './example/monacoeditorwork');
|
|
29
|
-
},
|
|
30
|
-
})
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const mainConfig = {
|
|
35
|
-
libMode: process.env.BUILD_TYPE !== 'APP',
|
|
36
|
-
entry: './src/index.tsx',
|
|
37
|
-
// libName: 'CEngine',
|
|
38
|
-
fileName: 'index',
|
|
39
|
-
external:
|
|
40
|
-
process.env.BUILD_TYPE === 'APP'
|
|
41
|
-
? []
|
|
42
|
-
: ['react', 'react-dom', 'monaco-editor', 'antd', '@chamn/model', '@chamn/layout'],
|
|
43
|
-
global: {
|
|
44
|
-
react: 'React',
|
|
45
|
-
'react-dom': 'ReactDOM',
|
|
46
|
-
},
|
|
47
|
-
vite: {
|
|
48
|
-
base: process.env.BUILD_TYPE === 'APP' ? '/chameleon/' : '',
|
|
49
|
-
build: {
|
|
50
|
-
outDir: process.env.BUILD_TYPE === 'APP' ? './example' : './dist',
|
|
51
|
-
copyPublicDir: process.env.BUILD_TYPE === 'APP',
|
|
52
|
-
},
|
|
53
|
-
plugins: plugins,
|
|
54
|
-
resolve: {
|
|
55
|
-
alias: [{ find: '@', replacement: path.resolve(__dirname, 'src') }],
|
|
56
|
-
},
|
|
57
|
-
css: {
|
|
58
|
-
preprocessorOptions: {
|
|
59
|
-
scss: {
|
|
60
|
-
additionalData: '@import "@/assets/styles/mixin.scss";',
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
const renderConfig = {
|
|
68
|
-
entry: './src/_dev_/render.ts',
|
|
69
|
-
formats: ['umd'],
|
|
70
|
-
libName: 'CRender',
|
|
71
|
-
fileName: 'render',
|
|
72
|
-
external: ['react', 'react-dom'],
|
|
73
|
-
global: {
|
|
74
|
-
react: 'React',
|
|
75
|
-
'react-dom': 'ReactDOM',
|
|
76
|
-
},
|
|
77
|
-
// 额外的 vite 配置
|
|
78
|
-
vite: {
|
|
79
|
-
build: {
|
|
80
|
-
copyPublicDir: false,
|
|
81
|
-
outDir: './public',
|
|
82
|
-
},
|
|
83
|
-
define: { 'process.env': {} },
|
|
84
|
-
},
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
const config = process.env.BUILD_TYPE === 'Render' ? renderConfig : mainConfig;
|
|
88
|
-
module.exports = config;
|