further webpack config cleanup

This commit is contained in:
bkmartinjr
2018-08-13 17:07:53 -07:00
parent 4e80ed6c5d
commit 34561a3b08
4 changed files with 12 additions and 46 deletions
@@ -22,10 +22,6 @@ module.exports = {
filename: "static/js/bundle.js",
publicPath: "/"
},
resolve: {
extensions: [".js", ".json"],
modules: ["node_modules"]
},
module: {
rules: [
{
@@ -80,18 +76,6 @@ module.exports = {
template: path.resolve("index.html"),
favicon: path.resolve("favicon.png")
}),
new webpack.LoaderOptionsPlugin({
options: {
eslint: {
configFile: path.resolve("./configuration/eslint/eslint.js"),
useEslintrc: false
},
postcss() {
return [autoprefixer];
}
}
}),
new webpack.DefinePlugin({ "process.env.NODE_ENV": '"development"' }),
// Note: only CSS is currently hot reloaded
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin()
@@ -5,9 +5,7 @@ const webpack = require("webpack");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const SWPrecacheWebpackPlugin = require("sw-precache-webpack-plugin");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const HtmlWebpackInlineSourcePlugin = require("html-webpack-inline-source-plugin");
const MinifyPlugin = require("babel-minify-webpack-plugin");
const src = path.resolve("src");
const nodeModules = path.resolve("node_modules");
@@ -17,23 +15,22 @@ const publicPath = "/";
module.exports = {
mode: "production",
bail: true,
// TODO: causes a js error, need to update to whatever webpack4 wants
// devtool: "cheap-source-map",
cache: false,
devtool: "cheap-source-map",
// XXX todo: why are we using our own polyfill and not babel-polyfill?
entry: [require.resolve("../polyfills/polyfills"), path.join(src, "index")],
output: {
path: path.resolve("build"),
filename: "static/js/[name].[chunkhash:8].js",
chunkFilename: "static/js/[name].[chunkhash:8].chunk.js",
// chunkFilename: "static/js/[name].[chunkhash:8].chunk.js",
publicPath
},
resolve: { extensions: [".js", ".json"] },
module: {
rules: [
{
test: /\.js$/,
include: src,
loader: "babel-loader",
// query: require("../babel/babel.prod")
options: require("../babel/babel.prod")
},
{
@@ -102,20 +99,6 @@ module.exports = {
}
}),
new HtmlWebpackInlineSourcePlugin(),
new webpack.LoaderOptionsPlugin({
options: {
eslint: {
configFile: path.resolve("./configuration/eslint/eslint.js"),
useEslintrc: false
},
postcss() {
return [autoprefixer];
}
}
}),
new webpack.DefinePlugin({ "process.env.NODE_ENV": '"production"' }),
new webpack.optimize.OccurrenceOrderPlugin(),
new MinifyPlugin(),
new MiniCssExtractPlugin({
filename: "static/css/[name].[contenthash:8].css"
}),
+8 -8
View File
@@ -2,11 +2,14 @@
"name": "cellxgene",
"version": "0.0.1",
"license": "MIT",
"description": "cellxgene is a web application for the interactive exploration of single cell sequence data.",
"description":
"cellxgene is a web application for the interactive exploration of single cell sequence data.",
"repository": "https://github.com/chanzuckerberg/cellxgene",
"scripts": {
"build": "npm run clean && webpack --config configuration/webpack/webpack.config.prod.js",
"dev": "npm run clean && webpack --config configuration/webpack/webpack.config.dev.js",
"build":
"npm run clean && webpack --config configuration/webpack/webpack.config.prod.js",
"dev":
"npm run clean && webpack --config configuration/webpack/webpack.config.dev.js",
"clean": "rimraf build",
"start": "node server/development.js",
"lint": "eslint src",
@@ -57,7 +60,6 @@
"babel-core": "^6.13.2",
"babel-eslint": "^8.2.6",
"babel-loader": "^7.1.2",
"babel-minify-webpack-plugin": "^0.3.1",
"babel-plugin-istanbul": "^3.1.2",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-react-constant-elements": "^6.9.1",
@@ -83,7 +85,7 @@
"file-loader": "^1.1.11",
"html-webpack-inline-source-plugin": "0.0.10",
"html-webpack-plugin": "^3.2.0",
"jest": "^23.4.1",
"jest": "^23.5.0",
"json-loader": "^0.5.4",
"mini-css-extract-plugin": "^0.4.1",
"nyc": "^13.0.1",
@@ -101,9 +103,7 @@
"webpack-hot-middleware": "^2.22.3"
},
"jest": {
"testMatch": [
"**/__tests__/**/?(*.)(spec|test).js?(x)"
],
"testMatch": ["**/__tests__/**/?(*.)(spec|test).js?(x)"],
"testURL": "http://localhost/"
}
}
-1
View File
@@ -1 +0,0 @@
module.exports = {};