|
|
@ -1,5 +1,8 @@ |
|
|
|
"use strict"; |
|
|
|
const path = require("path"); |
|
|
|
const webpack = require("webpack"); |
|
|
|
|
|
|
|
const packageJSON = require("./package.json"); |
|
|
|
|
|
|
|
function resolve(dir) { |
|
|
|
return path.join(__dirname, dir); |
|
|
@ -79,6 +82,14 @@ module.exports = { |
|
|
|
chainWebpack(config) { |
|
|
|
config.plugins.delete("preload"); // TODO: need test
|
|
|
|
config.plugins.delete("prefetch"); // TODO: need test
|
|
|
|
config.plugin("DefinePlugin").use(webpack.DefinePlugin, [ |
|
|
|
{ |
|
|
|
"process.env.Version": (() => |
|
|
|
JSON.stringify( |
|
|
|
`${new Date().toLocaleString()}-V${packageJSON.version}` |
|
|
|
))(), |
|
|
|
}, |
|
|
|
]); |
|
|
|
|
|
|
|
const rootModulesPath = path.resolve("node_modules"); |
|
|
|
if (config.resolve.modules.store.has(rootModulesPath)) { |
|
|
|