@nx/webpack:configuration
Add Webpack Configuration to a project.
The State of JS survey is live, featuring a monorepo tools sectionThe State of JS survey is live, featuring a monorepo tools sectionVote for us
Please do not extend this schema as it is part of Nx internal usage.
Add Webpack Configuration to a project.
1nx generate configuration ...
2
1nx g webpack-project ... #same
2
By default, Nx will search for configuration
in the default collection provisioned in workspace.json.
You can specify the collection explicitly as follows:
1nx g @nx/webpack:configuration ...
2
Show what will be generated without writing to disk:
1nx g configuration ... --dry-run
2
Path relative to the workspace root for the main entry file. Defaults to '<projectRoot>/src/main.ts'.
The name of the project.
Path relative to the workspace root for the tsconfig file to build with. Defaults to '<projectRoot>/tsconfig.app.json'.
Optionally specify a path relative to workspace root to the babel configuration file of your project.
swc
babel
, swc
, tsc
The compiler to use to build source.
false
Add a serve target to run a local webpack dev-server
web
node
, web
, webworker
Target platform for the build, same as the Webpack config option.
false
Skip formatting files.
false
Do not add dependencies to package.json
.
false
Do not perform any validation on existing project.
Path relative to workspace root to a custom webpack file that takes a config object and returns an updated config.