Skip to content
Discussion options

You must be logged in to vote

This is working for me. If someone has a better solution, please let me know.

rollupOptions: {
      output: {
          assetFileNames: (assetInfo) => {
              var info = assetInfo.name.split('.')
              var extType = info[info.length - 1]
              if (
                  /png|webp|jpe?g|svg|gif|tiff|bmp|ico/i.test(
                      extType
                  )
              ) {
                  return `images/[name][extname]`
              } else {
                  return `css/[name]-[hash][extname]`
              }
          },
          chunkFileNames: 'js/[name].[hash].js',
          entryFileNames: 'js/[name].[hash].js'
      }
  }

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by simplerethink
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