mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
fix: Unify build configs
This commit is contained in:
parent
1c8c635e48
commit
cac354caa9
@ -15,9 +15,7 @@
|
||||
],
|
||||
"scripts": {
|
||||
"build:development": "webpack --progress --color",
|
||||
"build:umd": "yarn build:development --mode production --config webpack.config.prod.babel.js",
|
||||
"build:esm": "yarn build:development --mode production --config webpack.config.prod.esm.babel.js",
|
||||
"build:production": "concurrently \"yarn build:umd\" \"yarn build:esm\"",
|
||||
"build:production": "yarn build:development --mode production --config webpack.config.prod.babel.js",
|
||||
"build": "concurrently \"yarn build:development\" \"yarn build:production\"",
|
||||
"postbuild": "documentation build src/mermaidAPI.js src/config.js src/defaultConfig.js --shallow -f md --markdown-toc false > docs/Setup.md",
|
||||
"build:watch": "yarn build:development --watch",
|
||||
|
@ -1,7 +1,17 @@
|
||||
import { jsConfig } from './webpack.config.base';
|
||||
|
||||
const minConfig = jsConfig();
|
||||
minConfig.mode = 'production';
|
||||
minConfig.output.filename = '[name].min.js';
|
||||
const umdConfig = jsConfig();
|
||||
umdConfig.mode = 'production';
|
||||
umdConfig.output.filename = '[name].min.js';
|
||||
|
||||
export default [minConfig];
|
||||
const esmConfig = jsConfig();
|
||||
esmConfig.mode = 'production';
|
||||
esmConfig.output.library = {
|
||||
type: 'module',
|
||||
};
|
||||
esmConfig.experiments = {
|
||||
outputModule: true,
|
||||
};
|
||||
esmConfig.output.filename = '[name].esm.min.js';
|
||||
|
||||
export default [umdConfig, esmConfig];
|
||||
|
@ -1,13 +0,0 @@
|
||||
import { jsConfig } from './webpack.config.base';
|
||||
|
||||
const minConfig = jsConfig();
|
||||
minConfig.mode = 'production';
|
||||
minConfig.output.library = {
|
||||
type: 'module',
|
||||
};
|
||||
minConfig.experiments = {
|
||||
outputModule: true,
|
||||
};
|
||||
minConfig.output.filename = '[name].esm.min.js';
|
||||
|
||||
export default [minConfig];
|
Loading…
x
Reference in New Issue
Block a user