Upgrade to Webpack 5 (#83)

Reviewed-on: https://codeberg.org/superseriousbusiness/masto-fe-standalone/pulls/83
Co-authored-by: Zoë Bijl <code@moiety.me>
Co-committed-by: Zoë Bijl <code@moiety.me>
This commit is contained in:
Zoë Bijl
2025-10-10 19:11:00 +02:00
committed by Zoë Bijl
parent 496fd5987e
commit 6301ae8023
6 changed files with 773 additions and 2806 deletions
+23 -21
View File
@@ -17,7 +17,7 @@ if (process.env.VAGRANT) {
module.exports = merge(sharedConfig, {
mode: 'development',
cache: true,
devtool: 'cheap-module-eval-source-map',
devtool: 'eval-cheap-module-source-map',
stats: {
errorDetails: true,
@@ -28,35 +28,37 @@ module.exports = merge(sharedConfig, {
},
devServer: {
clientLogLevel: 'none',
compress: settings.dev_server.compress,
quiet: settings.dev_server.quiet,
disableHostCheck: settings.dev_server.disable_host_check,
host: settings.dev_server.host,
port: settings.dev_server.port,
https: settings.dev_server.https,
hot: settings.dev_server.hmr,
contentBase: settings.public_root_path,
inline: settings.dev_server.inline,
useLocalIp: settings.dev_server.use_local_ip,
public: settings.dev_server.public,
publicPath: output.publicPath,
historyApiFallback: {
disableDotRule: true,
},
headers: settings.dev_server.headers,
overlay: settings.dev_server.overlay,
stats: {
entrypoints: false,
errorDetails: false,
modules: false,
moduleTrace: false,
client: {
logging: 'none',
overlay: settings.dev_server.overlay,
},
watchOptions: Object.assign(
{},
settings.dev_server.watch_options,
watchOptions,
),
writeToDisk: filePath => /ocr/.test(filePath),
static: {
directory: settings.public_root_path,
serveIndex: true,
watch: Object.assign(
{},
settings.dev_server.watch_options,
watchOptions,
),
},
devMiddleware: {
publicPath: output.publicPath,
stats: {
entrypoints: false,
errorDetails: false,
modules: false,
moduleTrace: false,
},
writeToDisk: filePath => /ocr/.test(filePath)
}
},
});