forked from mirror/misskey
Define NODE_ENV for production build
This commit is contained in:
parent
3bd2ba20d1
commit
8cec11c813
@ -1,3 +1,5 @@
|
|||||||
|
import * as webpack from 'webpack';
|
||||||
|
|
||||||
import consts from './consts';
|
import consts from './consts';
|
||||||
import hoist from './hoist';
|
import hoist from './hoist';
|
||||||
import minify from './minify';
|
import minify from './minify';
|
||||||
@ -7,7 +9,12 @@ const isProduction = env === 'production';
|
|||||||
|
|
||||||
export default (version, lang) => {
|
export default (version, lang) => {
|
||||||
const plugins = [
|
const plugins = [
|
||||||
consts(lang)
|
consts(lang),
|
||||||
|
new webpack.DefinePlugin({
|
||||||
|
'process.env': {
|
||||||
|
NODE_ENV: JSON.stringify(process.env.NODE_ENV)
|
||||||
|
}
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
if (isProduction) {
|
if (isProduction) {
|
||||||
|
Loading…
Reference in New Issue
Block a user