I am using requireJS to minify js and css files for a wordpress theme, however I want the style.css to be ignored when requireJS builds the optimized theme as the optimized theme folder is supposed to have another style.css file.
My app.build.js file looks like this:
({
appDir: "../",
baseUrl: "js",
dir: "../../target/",
modules: [
{
name: "main"
}
],
paths: {
[...]
},
shim: {
[...]
}
})
I have previously tried to add the following to no avail:
fileExclusionRegExp: /^style$/,
Since knowing when the file has loaded is not reliable, it does not make sense to explicitly support CSS files in RequireJS loading, since it will lead to bug reports due to browser behavior.
That’s why Requirejs does not support CSS loading.