Skip to content

Commit

Permalink
Merge pull request wegue-oss#208 from fschmenger/babel-upgrade
Browse files Browse the repository at this point in the history
Babel upgrade
  • Loading branch information
chrismayer authored May 4, 2021
2 parents 8651ceb + ba2af91 commit ee2910a
Show file tree
Hide file tree
Showing 4 changed files with 2,265 additions and 1,020 deletions.
39 changes: 30 additions & 9 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,18 +1,39 @@
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
[
"@babel/preset-env",
{
"corejs": { "version": 3, "proposals": true },
"useBuiltIns": "usage",
"modules": false,
"targets": {
"browsers": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
}
}],
"stage-2"
]
],
"plugins": [
[
"@babel/plugin-transform-runtime",
{
"corejs": 3
}
],
"@babel/plugin-proposal-class-properties"
],
"plugins": ["transform-runtime"],
"env": {
"test": {
"presets": ["env", "stage-2"],
"plugins": ["istanbul"]
"presets": [
"@babel/preset-env"
],
"plugins": [
"istanbul",
"@babel/plugin-proposal-class-properties"
]
}
}
}
3 changes: 3 additions & 0 deletions build/webpack.base.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ module.exports = {
test: /\.js$/,
loader: 'babel-loader',
include: [resolve('app'), resolve('src'), resolve('test'), resolve('node_modules/ol')],
options: {
presets: ['@babel/preset-env']
}
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
Expand Down
Loading

0 comments on commit ee2910a

Please sign in to comment.