question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

webpackConfig for @nrwl/web:dev-server

See original GitHub issue

Description

While @nrwl/web:build allows you to extend webpack configuration using the webpackConfig flag. I’m surprised to understand that it’s not allowed in @nrwl/web:dev-server.

Motivation

I have been using docker configuration in my project that I’m trying to migrate to Nx but since extending the webpackConfig is not allowed in @nrwl/dev-server, I can’t add custom dev server parameters like

disableHostCheck: true,
historyApiFallback: true,

etc. The webpackConfig customisation muist be allowed be allowed in order to support it. Or in general too, it must be allowed to customise things whenever needed.

Suggested Implementation

There should be webpackConfig option available for @nrwl/web:dev-server just like @nrwl/web:build

"serve": {
    "executor": "@nrwl/web:dev-server",
    "options": {
    "webpackConfig": "<path>"
    }
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

9reactions
fguittoncommented, Dec 5, 2021

This is still of interest 💯 !

3reactions
github-actions[bot]commented, Dec 5, 2021

This issue has been automatically marked as stale because it hasn’t had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

@nrwl/webpack:dev-server | Nx
Serve a web application. Options can be configured in project.json when defining the executor, or when invoking it. Read more about how to...
Read more >
How to use custom webpack configuration in an Nx project?
How to customize webpack config for an NX project? · Go to the workspace.json file · Find the project you wish to edit...
Read more >
Newest 'webpack-dev-server' Questions
I have a traditional mvc application (using spring mvc). And each endpoints return a html with the javascript and css files. I can...
Read more >
nrwl/web - Nx
The create-nx-workspace command will ask you to select a preset, which will configure some plugins and create your applications to help you get...
Read more >
Setup Module Federation in Angular with Nx | by Colum Ferry
Changes the build and serve target to use @nrwl/angular:webpack-browser and @nrwl/angular:module-federation-dev-server respectively, which allow for custom ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found