The following npm tasks are available by default after installing fe-build, but you need to add them manually to your package.json file.
Add nc-fe-build --task=webpack task in package.json scripts
"scripts": {
"build:js": "nc-fe-build --task=webpack"
},To execute it, open the terminal and run npm run build:js from the same folder where the file package.json is.
"scripts": {
"build:css": "nc-fe-build --task=styles"
}, "scripts": {
"build:clientlibs": "nc-fe-build --task=clientlibs"
}You can run the build from a single configuration file:
"scripts": {
"build:config": "nc-fe-build --config-file=path/to/configFile"
} "scripts": {
"watch:js": "nc-fe-build --task=webpack --watch",
"watch:css": "nc-fe-build --task=styles --watch",
}Analyze the bundles with Webpack Bundle Analyzer.
"scripts": {
"analyze": "nc-fe-build --task=webpack --analyze --development"
}To change the port number, you can append the argument --port= followed by a valid port number.
You can add the following arguments to the nc-fe-build command in order to change its behavior.
| Argument | Description |
|---|---|
--quiet |
Displays less messages in the output |
--disable-styelint |
Disables Stylelint |