Skip to content
Discussion options

You must be logged in to vote

For future reference, I was able to successfully rename all assets by replacing the above hook with:

config(config) {
  config.build.rollupOptions.output.assetFileNames =
    config.build.rollupOptions.output.assetFileNames.replace('[hash]', `[hash]-v${pkg.version}`)

  config.build.rollupOptions.output.chunkFileNames =
    config.build.rollupOptions.output.chunkFileNames.replace('[hash]', `[hash]-v${pkg.version}`)

  config.build.rollupOptions.output.entryFileNames =
    config.build.rollupOptions.output.entryFileNames.replace('[hash]', `[hash]-v${pkg.version}`)

  return config
}

I've also included these to the plugin's configuration (post is needed so that it kicks in after SvelteKit h…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by raduab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant