I have implemented CSS grid layout and CSS flexbox for styling website. I need to use PostCSS plugin autoprefixer to amend grid CSS styling so that it work in IE11 On official github link the documentation contains it's usage with webpack Autoprefixer webpack so
- do need to install webpack separately in my angular app. As I have read that angular CLI uses webpack under the hood.
- What is right way to use such plugins or laoders in angular app?
This post has explained that how can we use webpack in angular app. So if we need to use webpack separately in angular app configured with angular CLI then what is purpose of ng serve?
As per What happens when you run ng serve? it says that ng serve run webpack-dev-server so that means angular cli project already have webpack.config.js file. So if I add another webpack.config.js file would that be right?
my package.json scripts:
"scripts": {
"ng": "ng",
"start": "ng serve",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"clean": "rimraf ./dist/",
"build": "ng build --prod --build-optimizer --vendor-chunk --common-chunk",
"serve:prod": "npm run clean && npm run build -- --env=prod && npm run server",
"serve:stage": "npm run clean && npm run build -- --env=stage && npm run server",
"analyze": "npm run clean && npm run build -- --stats-json --named-chunks && webpack-bundle-analyzer ./dist/stats.json",
"server": "cd dist && http-server"
},
Let me know if my Question is vague. Thanks.