Explicitly specify browser compatibility in babel
We do this in cockpit and cockpit-ostree.
This commit is contained in:
parent
077eba3ede
commit
eea86c986f
2 changed files with 21 additions and 7 deletions
4
.babelrc
4
.babelrc
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"presets": ["@babel/env",
|
||||
"@babel/preset-react"]
|
||||
}
|
||||
|
|
@ -95,6 +95,24 @@ if (production) {
|
|||
}));
|
||||
}
|
||||
|
||||
var babel_loader = {
|
||||
loader: "babel-loader",
|
||||
options: {
|
||||
presets: [
|
||||
["@babel/env", {
|
||||
"targets": {
|
||||
"chrome": "57",
|
||||
"firefox": "52",
|
||||
"safari": "10.3",
|
||||
"edge": "16",
|
||||
"opera": "44"
|
||||
}
|
||||
}],
|
||||
"@babel/preset-react"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
mode: production ? 'production' : 'development',
|
||||
entry: info.entries,
|
||||
|
|
@ -117,17 +135,17 @@ module.exports = {
|
|||
},
|
||||
{
|
||||
exclude: /node_modules/,
|
||||
loader: 'babel-loader',
|
||||
use: babel_loader,
|
||||
test: /\.js$/
|
||||
},
|
||||
{
|
||||
exclude: /node_modules/,
|
||||
loader: 'babel-loader',
|
||||
use: babel_loader,
|
||||
test: /\.jsx$/
|
||||
},
|
||||
{
|
||||
exclude: /node_modules/,
|
||||
loader: 'babel-loader',
|
||||
use: babel_loader,
|
||||
test: /\.es6$/
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue