feat: production server build
This commit is contained in:
parent
c7529b1fd8
commit
74b605ea75
|
@ -2,8 +2,10 @@ const path = require('path');
|
|||
|
||||
const webpack = require('webpack');
|
||||
|
||||
const isProduction = !!process.argv.find((arg) => '--production' === arg);
|
||||
|
||||
const config = {
|
||||
mode: 'development',
|
||||
mode: isProduction ? 'production' : 'development',
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
|
@ -53,6 +55,7 @@ const config = {
|
|||
],
|
||||
},
|
||||
output: {
|
||||
// Worker happiness.
|
||||
globalObject: `(typeof self === 'undefined' ? this : self)`,
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
filename: '[name].js',
|
||||
|
|
Loading…
Reference in New Issue
Block a user