bulid是用脚手架搭建完毕后自动生成的,如果需要配置,可以看以下的代码:
build: {
transpile:
[/^element-ui/],
/* ** You can extend webpack config here */
// loaders: {
// vue: {
// transformAssetUrls: {
// audio: 'src'
// }
// }
// },
extend (config, ctx) {
config.module.rules.push({
test: /\.(ogg|mp3|wav|mpe?g)$/i,
loader: 'file-loader',
options: {
name: '[path][name].[ext]'
}
})
}
}}