fix: removes prod devtool

This commit is contained in:
James
2021-01-05 14:51:19 -05:00
parent f20f6d70a0
commit 680863702e
2 changed files with 9 additions and 5 deletions

View File

@@ -22,10 +22,15 @@ export const build = (): void => {
webpack(webpackProdConfig, (err, stats) => { // Stats Object
if (err || stats.hasErrors()) {
// Handle errors here
console.error(stats.toString({
chunks: false,
colors: true,
}));
if (stats) {
console.error(stats.toString({
chunks: false,
colors: true,
}));
} else {
console.error(err.message);
}
}
});
} catch (err) {

View File

@@ -19,7 +19,6 @@ export default (payloadConfig: Config): Configuration => {
chunkFilename: '[name].[chunkhash].js',
},
mode: 'production',
devtool: 'none',
stats: 'errors-only',
optimization: {
minimizer: [new TerserJSPlugin({}), new CssMinimizerPlugin()],