Skip to content

Extra HTML pages - specify "dist" location #756

Closed Answered by JoeyDoey
JoeyDoey asked this question in Q&A
Discussion options

You must be logged in to vote
// vite.config.js
import { resolve } from 'path';
import { defineConfig } from 'vite';
import { crx } from '@crxjs/vite-plugin';
import manifest from './manifest.json';

export default defineConfig({
  root: resolve(__dirname, './src'), // 👈  Needed to define root as same
  build: {
    rollupOptions: {
      input: {
        welcome: resolve(__dirname, 'index.html'),
        panel: resolve(__dirname, 'src/panel.html'),
      },
    },
  },
  plugins: [crx({ manifest })],  
});

output is now:

dist/
  pages/
   panel.html

Replies: 1 comment

Comment options

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