Introduce object rest spread (#1763)

This commit is contained in:
Paulus Schoutsen
2018-10-14 19:03:25 +02:00
committed by GitHub
parent 2f6595bca7
commit 3949b47e51
9 changed files with 54 additions and 78 deletions

View File

@@ -1,6 +1,7 @@
const path = require("path");
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const { babelLoaderConfig } = require("../config/babel.js");
const isProd = process.env.NODE_ENV === "production";
const chunkFilename = isProd ? "chunk.[chunkhash].js" : "[name].chunk.js";
@@ -15,24 +16,7 @@ module.exports = {
entry: "./src/entrypoint.js",
module: {
rules: [
{
test: /\.js$/,
use: {
loader: "babel-loader",
options: {
plugins: [
// Only support the syntax, Webpack will handle it.
"@babel/syntax-dynamic-import",
[
"@babel/transform-react-jsx",
{
pragma: "h",
},
],
],
},
},
},
babelLoaderConfig({ latestBuild: true }),
{
test: /\.(html)$/,
use: {