Browse Source

Fixed hot reload

design-update
Jake Ginnivan 2 months ago
parent
commit
9c6000a2c9
  1. 4
      package.json
  2. 6
      webpack.config.js

4
package.json

@ -3,7 +3,7 @@
"scripts": {
"zip": "node createZip.js",
"prebuild": "npm run zip",
"dev": "cross-env NODE_ENV=development webpack-dev-server",
"dev": "cross-env NODE_ENV=development webpack serve --open",
"prod": "npm run zip && cross-env NODE_ENV=production webpack"
},
"devDependencies": {
@ -27,4 +27,4 @@
"autoprefixer": "^10.4.7",
"typeface-roboto-mono": "^1.1.13"
}
}
}

6
webpack.config.js

@ -1,6 +1,7 @@
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const path = require("path");
module.exports = {
entry: "./src/css/tailwind.src.css",
@ -13,6 +14,11 @@ module.exports = {
},
],
},
devServer: {
static: "./dist",
watchFiles: path.join(__dirname, "src"),
hot: true,
},
plugins: [
new MiniCssExtractPlugin(),
new HtmlWebpackPlugin({

Loading…
Cancel
Save