Webpack installation:
The webpack installation similar like other npm modules.
Above command will install the webpack locally.
If we want we can install webpack globally with above command.
Installing locally is recommended for most projects. This makes it easier to upgrade projects individually when breaking changes are introduced. Typically webpack is run via one or more npm scripts which will look for a webpack installation in your local node_modules directory.
Angular-webpack-seed setup:
Loading CSS
In order to import a CSS file from within a JavaScript module, you need to install and add the style-loader and css-loader to your module configuration:
The webpack installation similar like other npm modules.
npm install --save webpack
Above command will install the webpack locally.
If we want we can install webpack globally with above command.
npm install -g --save webpack
Installing locally is recommended for most projects. This makes it easier to upgrade projects individually when breaking changes are introduced. Typically webpack is run via one or more npm scripts which will look for a webpack installation in your local node_modules directory.
Angular-webpack-seed setup:
mkdir angular-webpack-seed
cd angular-webpack-seed
npm init -y // To generate the package.json
npm install --save webpack // This will add webpack as a dev dependencies.
Loading CSS
In order to import a CSS file from within a JavaScript module, you need to install and add the style-loader and css-loader to your module configuration:
npm install --save style-loader css-loader
No comments:
Post a Comment