How do I include additional pages not in the manifest? #271
-
The idea is to show a page (included within the extension) when the user clicks on the extension icon. The directory structure for my extension is as follows:
I am opening the page via: chrome.action.onClicked.addListener(async () => {
await chrome.windows.create({
url: `extension://${chrome.runtime.id}/app/index.html`,
type: 'popup',
height: applicationHeight,
width: applicationWidth,
focused: focused
});
}); However the manifest file doesn't include any reference to the file (since it is not a part of any of the extension pages ie. newtab/options/devpanel etc). As a result the build output doesn't include the file. Is there an easy solution to this? My |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
You can define extra HTML pages in Vite will take care of file-splitting if you do it this way 👍 |
Beta Was this translation helpful? Give feedback.
Examples are in the tests, this is one with an iframe in the options page.
I'm writing an article for v4 multipage extensions, this seems to be a popular use case.
v4 docs are in progress, v3 docs are at https://www.extend-chrome.dev/rollup-plugin