Topic: Build .css file with custom changes, to load in beginning of document
How is it possible to not only building the main.js, but also the .css file.
I understand that .js loads the CSS styles, but as main.js is loaded at the end of the document, all styles are loaded in the end. I could use the default css file, but then (cause my custom theme), it will load default colors, and then change when main.js is loaded.
Loading main.js at the beginning causes webpage elements to work incorrectly.
How can I get a .css version of my build, that I can preload?
Grzegorz Bujański staff answered a year ago
Have you tried using our webpack starter to create such a build? https://mdbootstrap.com/docs/standard/getting-started/webpack-integration/
1Relation pro premium commented a year ago
Followed this exact guide, no where does it say how to get the .css file builded, only main.js
Grzegorz Bujański staff commented a year ago
In case of webpack you can use this plugin: https://webpack.js.org/plugins/mini-css-extract-plugin/#using-preloaded-or-inlined-css
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 6.4.0
- Device: Computer
- Browser: Firefox
- OS: Windows
- Provided sample code: No
- Provided link: No