Skip to content
This repository was archived by the owner on Oct 10, 2022. It is now read-only.

Commit 934ecf1

Browse files
committed
webpack: add babel-loader
1 parent ecfe3c0 commit 934ecf1

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"Bret Comnes <bcomnes@gmail.com> (https://bret.io)"
3131
],
3232
"dependencies": {
33+
"@babel/runtime": "^7.1.2",
3334
"@netlify/open-api": "^0.4.1",
3435
"archiver": "^3.0.0",
3536
"backoff": "^2.5.0",
@@ -56,8 +57,12 @@
5657
"util.promisify-all": "^1.0.2"
5758
},
5859
"devDependencies": {
60+
"@babel/core": "^7.1.2",
61+
"@babel/plugin-transform-runtime": "^7.1.0",
62+
"@babel/preset-env": "^7.1.0",
5963
"ava": "1.0.0-beta.7",
6064
"babel-eslint": "^9.0.0",
65+
"babel-loader": "^8.0.4",
6166
"body": "^5.1.0",
6267
"coveralls": "^3.0.2",
6368
"dependency-check": "^3.2.1",

webpack.config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,19 @@ module.exports = {
55
library: 'NetlifyClient',
66
libraryTarget: 'umd',
77
},
8+
module: {
9+
rules: [
10+
{
11+
test: /\.m?js$/,
12+
exclude: /(node_modules|bower_components)/,
13+
use: {
14+
loader: 'babel-loader',
15+
query: {
16+
presets: [['@babel/preset-env', {modules: 'commonjs'}]],
17+
plugins: ['@babel/plugin-transform-runtime'],
18+
},
19+
},
20+
},
21+
],
22+
},
823
}

0 commit comments

Comments
 (0)