解决方案
两处修改:
1、在.electron-vue/webpack.renderer.config.js 文件找到CopyWebpackPlugin,大概在186行左右,
将
new CopyWebpackPlugin([
{
from: path.join(__dirname, '../static'),
to: path.join(__dirname, '../dist/electron/static'),
ignore: ['.*']
}
]),
改为
new CopyWebpackPlugin({
patterns: [{
from: path.join(__dirname, '../static'),
to: path.join(__dirname, '../dist/electron/static')
}]
})
2、在.electron-vue/webpack.web.config.js 文件找到CopyWebpackPlugin,大概在135行左右,
将
new CopyWebpackPlugin([
{
from: path.join(__dirname, '../static'),
to: path.join(__dirname, '../dist/web/static')
ignore: ['.*']
}
]),
改为
new CopyWebpackPlugin({
patterns: [{
from: path.join(__dirname, '../static'),
to: path.join(__dirname, '../dist/web/static')
}]
})
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…