Skip to content

Commit a071676

Browse files
committed
Update webpack HMR for new dev environment
1 parent 0bd182c commit a071676

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
"watch": "cross-env NODE_ENV=development ./node_modules/.bin/webpack --watch --progress",
113113
"build": "cross-env NODE_ENV=development ./node_modules/.bin/webpack --progress",
114114
"build:production": "yarn run clean && cross-env NODE_ENV=production ./node_modules/.bin/webpack --mode production",
115-
"serve": "yarn run clean && cross-env PUBLIC_PATH=https://pterodactyl.test:8080 NODE_ENV=development webpack-dev-server --host 0.0.0.0 --hot --https --key /etc/ssl/private/pterodactyl.test-key.pem --cert /etc/ssl/private/pterodactyl.test.pem"
115+
"serve": "yarn run clean && cross-env WEBPACK_PUBLIC_PATH=/webpack@hmr/ NODE_ENV=development webpack-dev-server --host 0.0.0.0 --port 8080 --public https://pterodactyl.test --hot"
116116
},
117117
"browserslist": [
118118
"> 0.5%",

webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports = {
1919
path: path.join(__dirname, '/public/assets'),
2020
filename: isProduction ? 'bundle.[chunkhash:8].js' : 'bundle.[hash:8].js',
2121
chunkFilename: isProduction ? '[name].[chunkhash:8].js' : '[name].[hash:8].js',
22-
publicPath: (process.env.PUBLIC_PATH || '') + '/assets/',
22+
publicPath: (process.env.WEBPACK_PUBLIC_PATH || '/assets/'),
2323
crossOriginLoading: 'anonymous',
2424
},
2525
module: {
@@ -115,7 +115,7 @@ module.exports = {
115115
devServer: {
116116
compress: true,
117117
contentBase: path.join(__dirname, '/public'),
118-
publicPath: (process.env.PUBLIC_PATH || '') + '/assets/',
118+
publicPath: process.env.WEBPACK_PUBLIC_PATH || '/assets/',
119119
allowedHosts: [
120120
'.pterodactyl.test',
121121
],

0 commit comments

Comments
 (0)