Skip to content

Commit

Permalink
switch to babel for examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jianhuang01 committed Apr 2, 2019
1 parent b096cd3 commit dea31de
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
5 changes: 3 additions & 2 deletions examples/website/arc/package.json
Expand Up @@ -14,8 +14,9 @@
"react-map-gl": "^3.3.0"
},
"devDependencies": {
"buble": "^0.19.3",
"buble-loader": "^0.5.0",
"@babel/core": "^7.4.0",
"@babel/preset-react": "^7.0.0",
"babel-loader": "^8.0.5",
"webpack": "^4.20.2",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.1"
Expand Down
8 changes: 4 additions & 4 deletions examples/website/arc/webpack.config.js
Expand Up @@ -19,13 +19,13 @@ const CONFIG = {
module: {
rules: [
{
// Compile ES2015 using buble
// Transpile ES6 to ES5 with babel
// Remove if your app does not use JSX or you don't need to support old browsers
test: /\.js$/,
loader: 'buble-loader',
include: [resolve('.')],
loader: 'babel-loader',
exclude: [/node_modules/],
options: {
objectAssign: 'Object.assign'
presets: ['@babel/preset-react']
}
}
]
Expand Down
5 changes: 3 additions & 2 deletions examples/website/line/package.json
Expand Up @@ -13,8 +13,9 @@
"react-map-gl": "^3.3.0"
},
"devDependencies": {
"buble": "^0.19.3",
"buble-loader": "^0.5.0",
"@babel/core": "^7.4.0",
"@babel/preset-react": "^7.0.0",
"babel-loader": "^8.0.5",
"webpack": "^4.20.2",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.1"
Expand Down
8 changes: 4 additions & 4 deletions examples/website/line/webpack.config.js
Expand Up @@ -19,13 +19,13 @@ const CONFIG = {
module: {
rules: [
{
// Compile ES2015 using buble
// Transpile ES6 to ES5 with babel
// Remove if your app does not use JSX or you don't need to support old browsers
test: /\.js$/,
loader: 'buble-loader',
include: [resolve('.')],
loader: 'babel-loader',
exclude: [/node_modules/],
options: {
objectAssign: 'Object.assign'
presets: ['@babel/preset-react']
}
}
]
Expand Down

0 comments on commit dea31de

Please sign in to comment.