Skip to content

Commit

Permalink
babel polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
yining1023 committed Dec 27, 2018
1 parent c7dfccb commit c4533e9
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 49 deletions.
116 changes: 87 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,17 @@
},
"homepage": "https://github.com/yining1023/p5.ble.js#readme",
"devDependencies": {
"@babel/polyfill": "7.2.5",
"babel-cli": "6.26.0",
"babel-core": "6.26.3",
"babel-loader": "7.1.5",
"babel-polyfill": "6.26.0",
"babel-preset-es2015": "6.24.1",
"babel-preset-stage-2": "6.24.1",
"babel-register": "6.26.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "1.6.1",
"eslint": "5.11.1",
"eslint-config-airbnb-base": "13.1.0",
"eslint-loader": "2.0.0",
Expand Down
35 changes: 20 additions & 15 deletions webpack.config.babel.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
import {
join
} from "path";
import { join } from 'path';

const include = join(__dirname, 'src')
const include = join(__dirname, 'src');

export default {
entry: "./src/p5.ble.js",
entry: ['babel-polyfill', './src/p5.ble.js'],
output: {
path: join(__dirname, "dist"),
libraryTarget: "umd",
library: "p5ble"
path: join(__dirname, 'dist'),
publicPath: '/',
libraryTarget: 'umd',
filename: 'p5.ble.js',
library: 'p5ble',
},
devtool: "source-map",
devtool: 'source-map',
module: {
rules: [
{
enforce: "pre",
enforce: 'pre',
test: /\.js$/,
exclude: /node_modules/,
loader: "eslint-loader",
loader: 'eslint-loader',
},
{
test: /\.js$/,
exclude: /node_modules/,
loader: "babel-loader",
}
]
}
loader: 'babel-loader',
},
{
test: /\.json$/,
loader: 'json',
include,
},
],
},
};
10 changes: 5 additions & 5 deletions webpack.dev.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ export default merge(common, {
devtool: 'inline-source-map',
devServer: {
watchContentBase: true,
contentBase: join(__dirname, './dist')
contentBase: join(__dirname, './dist'),
},
plugins: [
new HtmlWebpackPlugin({
title: 'p5ble'
})
]
})
title: 'p5ble',
}),
],
});

0 comments on commit c4533e9

Please sign in to comment.