在构建我的Angular4应用程序之后,Webpack将我的图像名称从bg_node_new.png
更改为bg_node_new.3746bc3ac9b1bf77d2aff2c2df901a48.png
。
我的Webpack配置代码是:
(function(module) {
const path = require('path');
const npm_cmd = process.env.npm_lifecycle_event;
const p = !(require('yargs').argv.p || false);
let config;
module.exports = function(env) {
let cmds = npm_cmd.split(":");
const cmd = cmds.length >= 2 ? cmds[1] : null;
const mod = cmds.length >= 3 ? cmds[2] : null;
const aot = cmds.length >= 4 ? cmds[3] : null;
const options = {
p:!p,
mod:mod,
aot:aot,
env:env,
ngv:2,
ctx:path.resolve(__dirname, "../../../../..")
}
//console.log(options);
switch (cmd) {
case 'app':
console.log("Building app");
config = require('./wp.app')(options);
break;
case 'lib':
console.log("Building lib");
config = require('./wp.lib')(options);
break;
case 'mod':
console.log("Building mod");
config = require('./wp.mod')(options);
break
default:
console.log("Building app");
config = require('./wp.app')(options);
break;
}
return config;
}
})(module);
由于这个问题,我的应用程序中的图像无法渲染。如何解决这个问题?
提前感谢!