Add back static assets

This commit is contained in:
MICHAEL JACKSON
2017-12-14 08:52:04 -08:00
parent f2daafadfb
commit 06c9296809
6 changed files with 215 additions and 64 deletions

View File

@ -1,6 +1,7 @@
const path = require("path")
const webpack = require("webpack")
const HTMLWebpackPlugin = require("html-webpack-plugin")
const CopyWebpackPlugin = require("copy-webpack-plugin")
module.exports = {
devtool: process.env.NODE_ENV === "production" ? false : "cheap-module-source-map",
@ -24,14 +25,15 @@ module.exports = {
},
plugins: [
new webpack.DefinePlugin({
"process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV || "development")
}),
new HTMLWebpackPlugin({
title: "unpkg",
chunks: ["client"],
template: path.resolve(__dirname, "client/index.html")
}),
new webpack.DefinePlugin({
"process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV || "development")
})
new CopyWebpackPlugin(["public"])
],
devServer: {