Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/vite-plugin/src/node/plugin-contentScripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export const pluginContentScripts: CrxPluginFn = () => {
}),
source: worldMainIds.has(script.id)
? createProMainLoader({
fileName: `./${fileName.split('/').at(-1)}`,
fileName: `../${fileName}`,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm not sure about the subdirectory why would it need a different behavior than a line below

 : createProLoader({ fileName }),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just works this way. If you want to see something like createProMainLoader({ fileName }) I can change createProMainLoader

})
: createProLoader({ fileName }),
})
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-plugin/src/node/plugin-manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export const pluginManifest: CrxPluginFn = () => {
const refId = this.emitFile({
type: 'chunk',
id,
name: basename(file),
name: file.replace(/[\\/]/g, '-'),
})
contentScripts.set(
file,
Expand Down
Loading