Skip to content

Commit 2e2a5da

Browse files
balloobeddywashere
authored andcommitted
fix(lib): import/export not getting transpiled in lib dir (#384)
1 parent af3ccbe commit 2e2a5da

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"transform-object-rest-spread"
88
],
99
"env": {
10+
"dist-dir": {
11+
"plugins": ["transform-es2015-modules-commonjs"]
12+
},
1013
"webpack": {
1114
"plugins": ["transform-es2015-modules-commonjs"]
1215
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"start": "BABEL_ENV=webpack webpack-dev-server --config ./webpack.dev.config.js --watch",
1313
"build-docs": "cross-env WEBPACK_BUILD=production webpack --config ./webpack.dev.config.js --progress --colors",
1414
"build": "cross-env NODE_ENV=production rollup -c",
15-
"prebuild": "babel src --out-dir lib --ignore src/__tests__/",
15+
"prebuild": "BABEL_ENV=dist-dir babel src --out-dir lib --ignore src/__tests__/",
1616
"create-release": "npm test && sh ./scripts/release",
1717
"publish-release": "npm test && sh ./scripts/publish",
1818
"lint": "eslint src"

0 commit comments

Comments
 (0)