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

Webpack cannot target webworker #17136

Closed
4 tasks
MaximSagan opened this issue May 22, 2023 · 1 comment · Fixed by #17137
Closed
4 tasks

Webpack cannot target webworker #17136

MaximSagan opened this issue May 22, 2023 · 1 comment · Fixed by #17137
Labels
outdated scope: bundlers Issues related to webpack, rollup type: bug

Comments

@MaximSagan
Copy link
Contributor

Current Behavior

When using @nrwl/webpack:webpack, a build cannot be targetted for web workers. Setting "target": "webworker" yields the following error message:

> NX Property 'target' does not match the schema. 'webworker' should be one of node,web.

This is despite the fact that webworker is a valid webpack target:
https://webpack.js.org/configuration/target/

Expected Behavior

Allow specificatiying "target": "webworker" without error.

GitHub Repo

No response

Steps to Reproduce

  1. New nx webpack project
  2. Set build target to webworker
  3. Run build

Nx Report

Node   : 18.14.2
   OS     : win32 x64
   npm    : 9.5.0
   Hasher : Native

   nx                 : 16.0.3
   @nx/js             : 16.0.3
   @nx/jest           : 16.0.3
   @nx/linter         : 16.0.3
   @nx/workspace      : 16.0.3
   @nx/angular        : 16.0.3
   @nx/cypress        : 16.0.3
   @nx/devkit         : 16.0.3
   @nx/eslint-plugin  : 16.0.3
   @nx/nest           : 16.0.3
   @nx/node           : 16.0.3
   @nrwl/tao          : 16.0.3
   @nx/webpack        : 16.0.3
   typescript         : 4.9.4

Failure Logs

` >  NX   Property 'target' does not match the schema. 'webworker' should be one of node,web.`

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@github-actions
Copy link

github-actions bot commented Jul 1, 2023

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: bundlers Issues related to webpack, rollup type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants