-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cli option for webpack-config (#709)
* Add cli option for webpack-config * Add more doc * Doc edits * Update documentation based off pr feedback
- Loading branch information
Showing
3 changed files
with
14 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,7 +140,7 @@ export default (webpackConfig) => { | |
} | ||
``` | ||
|
||
In the `.reactserverrc` file add an option for `webpack-config` that points to that function file and when React Server is setting up Webpack it will call your function with the result of the built in Webpack options, allowing you to make any modifications needed. | ||
In the `.reactserverrc` file add an option for `webpackConfig` that points to that function file and when React Server is setting up Webpack it will call your function with the result of the built in Webpack options, allowing you to make any modifications needed. This may also be specified on the command line with the `--webpack-config=<FILE>` option. | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
gigabo
Contributor
|
||
|
||
### Use Custom Express Middleware | ||
Currently the default Express Middlewares used are compression, body-parser, cookie-parser. If you need to setup custom express middleware you can do it with a setup function. | ||
|
@@ -283,6 +283,11 @@ Path to the custom middleware function file. If it is not defined the default se | |
|
||
Defaults to **undefined**. | ||
|
||
#### --webpack-config | ||
Path to your webpack options callback function file. | ||
|
||
Defaults to **undefined**. | ||
|
||
#### --long-term-caching | ||
Adds hashes to all JavaScript and CSS file names output by the build, allowing | ||
for the static files to be served with far-future expires headers. This option | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GAAHHHH!!!!! This is a breaking change! This needs to be highlighted in the CHANGELOG as a breaking change. I've been pulling my hair out for HOURS trying to figure out why my Webpack aliases no longer worked.