html entrypoint files in dist/src folder #18047
Answered
by
romhenri
juliankasimir
asked this question in
Q&A
-
If I'm building a Chrome Extension and need the HTML, CSS, and JS files to be grouped together in the 'popup' folder within the 'dist' build directory, is it standard practice to configure it this way? // vite.config.js
export default defineConfig({
...
root: 'src',
publicDir: '../public', // relative to root
emptyOutDir: true, // if you still want to clear outDir without warning
build: {
outDir: '../dist/', // relative to root
...
}
}) Source: |
Beta Was this translation helpful? Give feedback.
Answered by
romhenri
Sep 8, 2024
Replies: 1 comment 2 replies
-
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:
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
juliankasimir
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: