diff --git a/package.json b/package.json index e6f0544..4ee87e7 100644 --- a/package.json +++ b/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" } -} +} \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index 16231a9..36a41c7 100644 --- a/webpack.config.js +++ b/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({