I have this in my package.json
:
build:prod
SET NODE_ENV=prod && webpack -p
What does -p
mean?
I have looked at the webpack documentation, but couldn't find anything for it.
Thanks.
Webpack is a tool that lets you compile JavaScript modules, also known as module bundler. Given a large number of files, it generates a single file (or a few files) that run your app. It can perform many operations: helps you bundle your resources.
There are four basic concepts in webpack: entry , output , modules and plug-ins . These configurations are added in webpack.
To summarize: Webpack is a module bundler, but you can also use it running tasks as well. Webpack relies on a dependency graph underneath. Webpack traverses through the source to construct the graph, and it uses this information and configuration to generate bundles. Webpack relies on loaders and plugins.
Webpack is the recommended bundling solution and should be preferred over Cassette or ASP.NET Bundling. Your project will bundle its own copy of react and react-dom with webpack, and ReactJS.NET will be used only for server-side rendering. Copy from the sample project to the root of your project: package.
The p
flag stands for Production. It will perform the following steps:
Read more about it here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With