Skip to content

Commit 21fbec3

Browse files
committed
Minify in production
1 parent 8081779 commit 21fbec3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

babel.config.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
2+
"env": {
3+
"development": {"comments": false, "minified": true},
4+
"production": {"comments": true, "minified": false}
5+
},
26
"presets": [
37
[
48
"@babel/preset-react",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"build:combined-translation-keys": "npm run build:translation-keys && node scripts/combineTranslationKeys.js",
1414
"build:css": "mkdirp lib && sass src/styles/main.scss:lib/react-chart-editor.css && postcss lib/react-chart-editor.css -o lib/react-chart-editor.min.css ",
1515
"build:js": "mkdirp lib && babel src --out-dir lib --ignore=__tests__/* --source-maps",
16-
"build": "rimraf lib && mkdir lib && npm run build:js && npm run build:css && npm run build:combined-translation-keys",
16+
"build": "BABEL_ENV=production rimraf lib && mkdir lib && npm run build:js && npm run build:css && npm run build:combined-translation-keys",
1717
"watch": "webpack serve --hot --mode development",
1818
"prepublishOnly": "npm run build",
1919
"storybook": "start-storybook -p 9001 -c .storybook",

0 commit comments

Comments
 (0)