Skip to content
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

Avoiding listing WebPack as a production dependency #604

Closed
fabiospampinato opened this issue Apr 28, 2024 · 2 comments · Fixed by #614
Closed

Avoiding listing WebPack as a production dependency #604

fabiospampinato opened this issue Apr 28, 2024 · 2 comments · Fixed by #614

Comments

@fabiospampinato
Copy link

I'm not sure how it happened exactly, but this module seems to depend on webpack and webpack-cli, which are listed as production dependencies in the package release to NPM, even though the package.json in the repo doesn't list any production dependencies, and depending on webpack and webpack-cli in production doesn't really make sense for almost any package.

Can this be fixed?

@fabiospampinato fabiospampinato changed the title Avoiding relying on WebPack in production Avoiding listing WebPack as a production dependency Apr 28, 2024
@Gudahtt
Copy link
Contributor

Gudahtt commented May 14, 2024

Presumably it was an unintended consequence of this change: #597

cc @Rob--W @rpl

The resulting manifest in v0.11.0 can be seen here: https://npmfs.com/package/webextension-polyfill/0.11.0/package.json

Gudahtt added a commit to Gudahtt/webextension-polyfill that referenced this issue May 14, 2024
Changes made in mozilla#597 accidentally resulted in `webpack` and
`webpack-cli` being added as dependencies in the manifest of the
published package. This problem can be seen in v0.11.0. For more
information, see mozilla#604.

`webpack` and `webpack-cli` are used for bundler smoke tests that are
run in CI. Rather than being installed during CI, these dependencies
are now included in `devDependencies`. A new npm script has been added
for running this script as well, to ensure that these dependencies are
on the PATH when this script is run.

The CircleCI config and the contributor docs have been updated to use
the new npm script. You can test it by running
`npm run test-module-bundlers-smoketest`.

Fixes mozilla#604
@Rob--W
Copy link
Member

Rob--W commented May 14, 2024

We should add --no-save to the npm install command. Otherwise npm will add it to package.json

Rob--W pushed a commit that referenced this issue May 14, 2024
Changes made in #597 accidentally resulted in `webpack` and
`webpack-cli` being added as dependencies in the manifest of the
published package. This problem can be seen in v0.11.0. For more
information, see #604.

`webpack` and `webpack-cli` are used for bundler smoke tests that are
run in CI. Rather than being installed during CI, these dependencies
are now included in `devDependencies`. A new npm script has been added
for running this script as well, to ensure that these dependencies are
on the PATH when this script is run.

The CircleCI config and the contributor docs have been updated to use
the new npm script. You can test it by running
`npm run test-module-bundlers-smoketest`.

Fixes #604
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants