Skip to content

Commit 4f19db5

Browse files
committed
fix: Transpile node modules
Fixes #99
1 parent ac16548 commit 4f19db5

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

babel.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ module.exports = {
1010
useBuiltIns: 'usage',
1111
}],
1212
],
13+
ignore: [/[\/\\]core-js/],
1314
plugins: [
1415
'@babel/plugin-proposal-object-rest-spread',
1516
'@babel/plugin-proposal-class-properties',
17+
'@babel/plugin-transform-modules-umd',
1618
],
1719
};

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"@babel/core": "^7.1.6",
4040
"@babel/plugin-proposal-class-properties": "^7.1.0",
4141
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
42+
"@babel/plugin-transform-modules-umd": "^7.2.0",
4243
"@babel/preset-env": "^7.1.6",
4344
"@hellosign/eslint-config": "^1.4.0",
4445
"babel-core": "^7.0.0-bridge.0",

webpack.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ const config = {
2121
rules: [
2222
{
2323
test: /\.js$/,
24-
exclude: /node_modules/,
24+
// Ordinarily we would `exclude: /node_modules/`
25+
// here, however some depdendencies use ES6 and
26+
// other new syntax. To ensure that our lib works
27+
// for as many users as possible, we pipe node
28+
// modules through Babel as well. See #99.
2529
use: 'babel-loader',
2630
},
2731
{

0 commit comments

Comments
 (0)