So is the fix to comment out
add_header X-Content-Type-Options nosniff always;
?
I assume this hasn’t been looked at since yet I face exactly the same problem…
Primary browser:
Chrome: Version 71.0.3578.98 (Official Build) (64-bit)
Also the same on:
Safari: Version 12.0 (14606.1.36.1.9)
Firefox Quantum: Latest
MacOS Mojave
Edit: Commenting out the above doesn’t work for me.
My set up slightly different though. I’m trying to achieve page specific css files.
In /assets/styles
I have a newly created folder with a css file in it:
assets/styles/single-pages/home.scss
All there is in there is img { width: 100px; }
for testing purposes.
config.js
"entry": {
"main": [
"./scripts/main.js",
"./styles/main.scss"
],
"home": [
"./styles/single-pages/home.scss"
],
"customizer": [
"./scripts/customizer.js"
]
}
setup.php
if(is_page('home')){
wp_enqueue_style('home.css', asset_path('styles/home.css'), false, null);
}
If I run yarn build and go to the static domain e.g. my-site.test, it works - no MIME errors.
If I THEN run yarn start I get MIME errors on both the static URL and the BrowserSync URL. However, updating the main.scss recompiles fine and the css updates display. Updates in home.scss
trigger the recompile automatically, but the not only do the updated values inside not apply, the origin (previous/original) styles don’t apply at all.
With that said, doing exactly the same procedure completely breaks styles on the static URL (no styles applied at all, same MIME errors) - yet the BrowserSync URL works ok besides the home.scss
not applying as described previously.
I have also tried just putting home.scss in the root assets/styles
folder and ammending the paths accordingly - didn’t fix, same problem.
What do I need to do to fix this so I can have individual css files output on individual pages? Any reliable ‘true’ way to do this?