How to bundle all the css file together and load on the top of the head before the document loads using webpack ?
相关问题
- Angular RxJS mergeMap types
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- Ignore Typescript errors in Webpack-dev-server
- How to update placeholder text in ng2-smart-table?
- How to instantiate Http service in main.ts manuall
相关文章
- angular脚手架在ie9+下兼容问题
- angular 前端项目 build 报错 "Cannot find module 'le
- 运行"WEBPACK_ENV=online webpack -p",如何将.scss e6文件转化
- Angular Material Stepper causes mat-formfield to v
- After upgrade to Angular 9 cannot find variable in
- is there any difference between import { Observabl
- Suppress “Circular dependency detected” suppress w
- How can you get current positional information abo
From my understanding, using a dummy .js file in order just to build a global/shared css bundle which imports needed css files may be a solution. I don't know if this is a best practice but works for me. An alternative approach may bu using Webpack together with Gulp, but it means an extra step will be required in every build.
So in webpack.config.js I have an entry such as:
In global-css-generator.js file, I just import the needed less files: