refactor : remove redundant if
This commit is contained in:
@@ -34,11 +34,6 @@ module.exports = function (webpackConfig) {
|
|||||||
|
|
||||||
if (isProd) {
|
if (isProd) {
|
||||||
config.module.rules.unshift(style9);
|
config.module.rules.unshift(style9);
|
||||||
} else {
|
|
||||||
config.module.rules.push(style9);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isProd) {
|
|
||||||
config.entry = {
|
config.entry = {
|
||||||
main: [...config.entry.main, ...config.entry.polyfills],
|
main: [...config.entry.main, ...config.entry.polyfills],
|
||||||
};
|
};
|
||||||
@@ -133,6 +128,7 @@ module.exports = function (webpackConfig) {
|
|||||||
});
|
});
|
||||||
config.module.rules.splice(6);
|
config.module.rules.splice(6);
|
||||||
} else {
|
} else {
|
||||||
|
config.module.rules.push(style9);
|
||||||
config.output = {
|
config.output = {
|
||||||
...config.output,
|
...config.output,
|
||||||
publicPath: '/',
|
publicPath: '/',
|
||||||
|
|||||||
@@ -35,11 +35,6 @@ module.exports = function (webpackConfig) {
|
|||||||
|
|
||||||
if (isProd) {
|
if (isProd) {
|
||||||
config.module.rules.unshift(style9);
|
config.module.rules.unshift(style9);
|
||||||
} else {
|
|
||||||
config.module.rules.push(style9);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isProd) {
|
|
||||||
config.entry = {
|
config.entry = {
|
||||||
main: [...config.entry.main, ...config.entry.polyfills],
|
main: [...config.entry.main, ...config.entry.polyfills],
|
||||||
};
|
};
|
||||||
@@ -124,6 +119,7 @@ module.exports = function (webpackConfig) {
|
|||||||
});
|
});
|
||||||
config.module.rules.splice(6);
|
config.module.rules.splice(6);
|
||||||
} else {
|
} else {
|
||||||
|
config.module.rules.push(style9);
|
||||||
config.output = {
|
config.output = {
|
||||||
...config.output,
|
...config.output,
|
||||||
publicPath: '/',
|
publicPath: '/',
|
||||||
|
|||||||
Reference in New Issue
Block a user