I have a problem with getting my mp3 files to work using the webpack file loader.
This is the issue:
I have a mp3 file on my harddisk, that if I open using c
This is how I process mp3 files using Webpack in Nuxt 2:
build: {
loaders: {
vue: {
transformAssetUrls: {
audio: 'src',
},
},
},
extend(config, ctx) {
config.module.rules.push({
test: /\.mp3$/,
loader: 'file-loader',
options: {
name: '[path][name].[ext]',
},
})
},
},
Now you can write in your templates and it should work.