-
-
Notifications
You must be signed in to change notification settings - Fork 318
Adds mode to the zip filenames #1605
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
Conversation
✅ Deploy Preview for creative-fairy-df92c4 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
I vote against this PR. |
This was done to keep parity with the default behavior of the output directory. There's a quick chat about it here too https://discord.com/channels/1212416027611365476/1224507127863967784/1359972453778067738 |
Well, then please let me add my two cents to this discussion: Anyway, this is just my opinion. But in any case, this PR is a breaking change that should be labelled as such. |
That's the way it was before 0.20.0. The change is here https://github.com/wxt-dev/wxt/pull/1086/files#diff-ff0465c3a486d3ba187204149a25fc8f632c44d65da356dc04c0f2b268a71506 My entire goal is to simply keep them consistent, hence the change.
Sure. |
sourcesTemplate: '{{name}}-{{version}}-sources.zip', | ||
artifactTemplate: '{{name}}-{{version}}-{{browser}}.zip', | ||
sourcesTemplate: '{{name}}-{{version}}-{{browser}}-{{mode}}-sources.zip', | ||
artifactTemplate: '{{name}}-{{version}}-{{browser}}-{{mode}}.zip', |
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.
I have to admit I misunderstood the PR at first and thought it was the {{manifestVersion}}
that should be added to the filenames, but it's the production mode.
Ok, then I agree with this PR in principle, because I too like consistency. But the outDirTemplate
uses {{modeSuffix}}
(‘-dev’ for development, ‘’ for production):
wxt/packages/wxt/src/core/resolve-config.ts
Lines 112 to 115 in d9f10c6
const outDirTemplate = ( | |
mergedConfig.outDirTemplate ?? | |
`${browser}-mv${manifestVersion}${modeSuffix}` | |
) |
So we should use
{{modeSuffix}}
in artifactTemplate
and sourcesTemplate
as well and not add {{browser}}
to sourcesTemplate
(the source zip is exactly the same for all browsers and should be generated only once anyway):
sourcesTemplate: '{{name}}-{{version}}-sources{{modeSuffix}}.zip',
artifactTemplate: '{{name}}-{{version}}-{{browser}}{{modeSuffix}}.zip',
This would for development result in:
extensionname-1.0.0-chrome-dev.zip
extensionname-1.0.0-firefox-dev.zip
extensionname-1.0.0-sources-dev.zip
and for production in:
extensionname-1.0.0-chrome.zip
extensionname-1.0.0-firefox.zip
extensionname-1.0.0-sources.zip
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.
I'm already handling this all in my config, so I'll just close this PR. Looks like you have another PR related to these templates, so I'll let you handle whatever you think will work best in the current state of things.
Yes, we should do this in the next major version. |
Overview
Manual Testing
Related Issue
This PR closes #<issue_number>