-
Notifications
You must be signed in to change notification settings - Fork 466
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
Document changing the webextension manifest name #1052
base: v2
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
{% warning %} | ||
|
||
With the default Web Extension config, the manifest has to be called `manifest.json` (and cannot be just any file with a `json` extension). | ||
|
||
{% endwarning %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the first actual change.
To make Parcel treat some other file as a manifest apart from `manifest.json`, add a few more lines to the `.parcelrc`: | ||
|
||
{% sample %} | ||
{% samplefile ".parcelrc" %} | ||
|
||
```json | ||
{ | ||
"extends": "@parcel/config-webextension", | ||
"transformers": { | ||
"some-other-manifest.json": ["@parcel/transformer-webextension"] | ||
}, | ||
"packagers": { | ||
"some-other-manifest.json": "@parcel/packager-webextension" | ||
} | ||
} | ||
``` | ||
|
||
{% endsamplefile %} | ||
{% endsample %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the other change, everything else was caused by Prettier for some reason.
|
Turns out this actually doesn't work yet because of this hardcoded name check: |
Exactly, that will be great.
…On 11/12/2022 3:04 PM, Niklas Mischkulnig wrote:
Turns out this actually doesn't work yet because of this hardcoded
name check:
https://github.com/parcel-bundler/parcel/blob/c3bbe0a6160186f496ca2f9e9bead9376c0522f1/packages/runtimes/webextension/src/WebExtensionRuntime.js#L18
We'll have to change that to just rely on some asset meta property...
—
Reply to this email directly, view it on GitHub
<#1052 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQWBM6E2KZXWOGS6TIRJ73WH5QB7ANCNFSM6AAAAAARUG5YII>.
You are receiving this because you commented.Message ID:
***@***.***>
|
If you stop hard-coding and rely on meta property, the build will go through. However, since the output file name remains the same, it cannot be loaded as a browser extension. I want to convert the file name to |
@kuroppe1819 using namer? https://parceljs.org/plugin-system/namer |
No description provided.