Topic: Build .css file with custom changes, to load in beginning of document

1Relation premium asked 10 months ago

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 10 months ago

Have you tried using our webpack starter to create such a build?

1Relation premium commented 10 months 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 10 months ago

In case of webpack you can use this plugin:

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Premium
  • 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