-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web Extensions: duplicate bundles when importing the same file via import
and manifest.json
#9446
Comments
I also tried using the same exact path in both, to no avail: import appUrl from 'url:./index.html'; "action": {
"default_icon": "logo.png",
"default_popup": "./index.html"
}, |
Does |
Yes. I also tried matching the exact string in both ways: |
Still reproducible with today's canary. Sub-dependencies are also duplicated:
contents are 100% match except these import paths. |
I'm seeing the same issue with just The repro: {
"background": {
"type": "module"
"service_worker": "background.js",
"scripts": [
"background.js"
]
},
} The generated |
🐛 bug report
In my extension, I mention the same file in the manifest and in a JS file. This causes Parcel to bundle the same file twice with two outputs. This in turn causes nearly every sub-import to also be duplicated. In this case the duplicate file was
source/index.html
(note that this screenshot was made aftertrash distribution && parcel build
)🎛 Configuration (.babelrc, package.json, cli command)
🤔 Expected Behavior
The file should not be duplicated.
😯 Current Behavior
Two
html
files appear indist
💻 Code Sample
Full repro can be found in this PR (until commit
1009154
)Note that in my case, the manifest actually mentions
index.html?type=popup
, which is valid and could further cause issues, but the same bug appears even without the search parameter.🌍 Your Environment
The text was updated successfully, but these errors were encountered: