How can I change path of files, when generating static with yarn run generate
?
For example, I need to get <img src="images/image.png">
but by default I get <img src="/image/image.png
I tried to use config bellow, and I had correct paths for .js files, but code into js-files wasn't running. Thanks for help.
extend(config, ctx) {
if (ctx.isDev && ctx.isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/
})
}
if (!ctx.isDev && ctx.isClient) {
// eslint-disable-next-line no-param-reassign
config.output.publicPath = '_nuxt/'
}
}