I have to install mini-css-extract-plugin in order to make Razzle 4 work.
Razzle 4 is usable without mini-css-extract-plugin if the project doesn't need that.
a) Make createConfigAsync.js to load this plugin only when it's actually used
b) Add a config option to disable css/style handling in default config (and leave it turned on by default for backward compatibility)
Projects without css (e.g. using a css-in-js solution).
Haven't tried this, but probably I could create a local mini-css-extract-plugin dummy project and point mini-css-extract-plugin to that folder with file:... in my package.json.
I can also install this package, but technically I don't need that, so... that's why I thought I should point this out.
Ideally every part of razzle should be a plugin. Then have a default set of core plugins.
I think when buildType is set to serveronly or serverless, mini-css-extract-plugin, postcss and html-webpack-plugin should be disabled by default, we can check if package is actually installed and only add in the chain if they're installed
Most helpful comment
Ideally every part of razzle should be a plugin. Then have a default set of core plugins.