fix dev server usage

This commit is contained in:
DaneEveritt 2025-11-24 16:41:12 -08:00
parent 44a625f84c
commit 6dc810261e
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
2 changed files with 8 additions and 8 deletions

View File

@ -137,7 +137,7 @@
"watch": "cross-env NODE_ENV=development ./node_modules/.bin/webpack --watch --progress",
"build": "cross-env NODE_ENV=development ./node_modules/.bin/webpack --progress",
"build:production": "yarn run clean && cross-env NODE_ENV=production NODE_OPTIONS=--openssl-legacy-provider ./node_modules/.bin/webpack --mode production",
"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"
"serve": "yarn run clean && cross-env NODE_ENV=development WEBPACK_PUBLIC_PATH=https://localhost:5173/ webpack serve --progress --hot --server-type https"
},
"browserslist": [
"> 0.5%",

View File

@ -17,8 +17,8 @@ module.exports = {
entry: ['react-hot-loader/patch', './resources/scripts/index.tsx'],
output: {
path: path.join(__dirname, '/public/assets'),
filename: isProduction ? 'bundle.[chunkhash:8].js' : 'bundle.[hash:8].js',
chunkFilename: isProduction ? '[name].[chunkhash:8].js' : '[name].[hash:8].js',
filename: isProduction ? 'bundle.[chunkhash:8].js' : 'bundle.[fullhash:8].js',
chunkFilename: isProduction ? '[name].[chunkhash:8].js' : '[name].[fullhash:8].js',
publicPath: (process.env.WEBPACK_PUBLIC_PATH || '/assets/'),
crossOriginLoading: 'anonymous',
},
@ -111,9 +111,6 @@ module.exports = {
syntactic: true,
},
},
// eslint: isProduction ? undefined : {
// files: `${path.join(__dirname, '/resources/scripts')}/**/*.{ts,tsx}`,
// }
}),
].filter(p => p),
optimization: {
@ -141,8 +138,11 @@ module.exports = {
},
devServer: {
compress: true,
contentBase: path.join(__dirname, '/public'),
publicPath: process.env.WEBPACK_PUBLIC_PATH || '/assets/',
port: 5173,
static: {
directory: path.join(__dirname, '/public'),
publicPath: process.env.WEBPACK_PUBLIC_PATH || '/assets/',
},
allowedHosts: [
'.pterodactyl.test',
],