Skip to content

Instantly share code, notes, and snippets.

@nickytonline
Last active December 2, 2019 04:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickytonline/02577d85c1571144d25a637f86ef3f4e to your computer and use it in GitHub Desktop.
Save nickytonline/02577d85c1571144d25a637f86ef3f4e to your computer and use it in GitHub Desktop.
@babel/preset-env not transpiling to ES5
module.exports = {
entry: {
acme_co_es5: [
"@babel/polyfill",
"./public/javascripts/webpack_entry_points/acme_co.js"
]
},
resolve: {
extensions: [".js", ".jsx"]
},
output: {
filename: "[name].js?[hash]",
sourceMapFilename: "[name].js.map",
path: "public/dist",
publicPath: "/dist"
},
plugins: [],
devtool: "cheap-module-eval-source-map",
module: {
rules: [
{
test: {},
exclude: {},
loader: "babel-loader",
query: {
presets: [
[
"@babel/preset-env",
{
targets: {
safari: "5.1"
},
debug: true
}
],
"@babel/preset-react"
],
plugins: [
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-class-properties"
]
}
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment