Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
Move webpack config to prod instead of dev
Browse files Browse the repository at this point in the history
  • Loading branch information
lukehb committed Feb 16, 2023
1 parent e4f8a09 commit 12171d1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
10 changes: 7 additions & 3 deletions Frontend/implementations/EpicGames/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const pages = fs.readdirSync('./src', { withFileTypes: true })

module.exports = (env) => {
return {
mode: 'development',
mode: 'production',
entry: pages.reduce((config, page) => {
config[page] = `./src/${page}.ts`;
return config;
Expand All @@ -28,7 +28,7 @@ module.exports = (env) => {
chunks: [page],
}), )),
// turn off so we can see the source map for dom delegate so we can debug the library
devtool: 'inline-source-map',

module: {
rules: [
{
Expand Down Expand Up @@ -74,12 +74,16 @@ module.exports = (env) => {
futureDefaults: true
},
optimization: {
minimize: false
minimize: true
},
devServer: {
static: {
directory: path.join(__dirname, '../../../SignallingWebServer/Public'),
},
},
stats: 'none',
performance: {
hints: false
}
};
}
11 changes: 7 additions & 4 deletions Frontend/library/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ const path = require('path');
const webpack = require('webpack');

module.exports = {
mode: 'development',
mode: 'production',
entry: {
index: './src/pixelstreamingfrontend.ts'
},
devtool: 'inline-source-map',
module: {
rules: [
{
Expand All @@ -36,7 +35,11 @@ module.exports = {
globalObject: 'this'
},
optimization: {
minimize: false
minimize: true,
usedExports: true,
},
stats: 'errors-only'
stats: 'errors-only',
performance: {
hints: false
}
};

0 comments on commit 12171d1

Please sign in to comment.