-
A basic crx implementation with pages in a // 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({
build: {
rollupOptions: {
// add any html pages here
input: {
// output file at '/index.html'
welcome: resolve(__dirname, 'index.html'),
// output file at '/src/panel.html' 👈
panel: resolve(__dirname, 'src/panel.html'),
},
},
},
plugins: [crx({ manifest })],
}); This is likely a Vite or Rollup thing but hopefully I can get help here... how do i get the output of the pages to be
as opposed to:
ref: |
Beta Was this translation helpful? Give feedback.
Answered by
JoeyDoey
Aug 31, 2023
Replies: 1 comment
-
// 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 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
JoeyDoey
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
output is now: