Skip to content

html entrypoint files in dist/src folder #18047

Answered by romhenri
juliankasimir asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, Is common and nice practice to configure the output structure of a Chrome Extension like that, especially when organizing files for a popup in the dist folder.

You can do something like this:

  root: 'src', 
  build: {
    outDir: '../dist', 
    rollupOptions: {
      input: {
        popup: 'src/popup/index.html', 
      },
      output: {
        entryFileNames: 'popup/[name].js',
        chunkFileNames: 'popup/[name].js', 
        assetFileNames: 'popup/[name].[ext]',
      },
    },
    emptyOutDir: true, 
  },
});```

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@juliankasimir
Comment options

@juliankasimir
Comment options

Answer selected by juliankasimir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants