-
I found after update to the newest version, the style file generated like |
Beta Was this translation helpful? Give feedback.
Answered by
doabit
Apr 23, 2021
Replies: 2 comments 6 replies
-
Hi, would you provide more information about your use case? |
Beta Was this translation helpful? Give feedback.
3 replies
-
Try add this codes to
build: {
rollupOptions: {
output: {
assetFileNames: (assetInfo) => {
let name = assetInfo.name
const reg = /(\.\w+)\.css$/
const result = reg.exec(name)
if (result) {
name = name.replace(result[0], '')
} else {
name = name.substr(0, name.lastIndexOf('.'))
}
return `assets/${name}.[hash][extname]`
}
}
}
} |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
nyrf
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try add this codes to
vite.config.js
, i think it worksvite.config.js