mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
fix: Unify build configs
This commit is contained in:
parent
1c8c635e48
commit
cac354caa9
@ -15,9 +15,7 @@
|
|||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:development": "webpack --progress --color",
|
"build:development": "webpack --progress --color",
|
||||||
"build:umd": "yarn build:development --mode production --config webpack.config.prod.babel.js",
|
"build:production": "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": "concurrently \"yarn build:development\" \"yarn build:production\"",
|
"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",
|
"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",
|
"build:watch": "yarn build:development --watch",
|
||||||
|
@ -1,7 +1,17 @@
|
|||||||
import { jsConfig } from './webpack.config.base';
|
import { jsConfig } from './webpack.config.base';
|
||||||
|
|
||||||
const minConfig = jsConfig();
|
const umdConfig = jsConfig();
|
||||||
minConfig.mode = 'production';
|
umdConfig.mode = 'production';
|
||||||
minConfig.output.filename = '[name].min.js';
|
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