Webpack style-loader vs css-loader

The CSS loader takes a CSS file and returns the CSS with imports and url(…) resolved via webpack’s require functionality: var css = require(“css!./file.css”); // => returns css code from file.css, resolves imports and url(…) It doesn’t actually do anything with the returned CSS. The style loader takes CSS and actually inserts it into the … Read more

Webpack “OTS parsing error” loading fonts

TL;DR Use absolute paths to your assets (including your complete hostname) by setting your output.publicPath to e.g. “http://example.com/assets/”. The problem The problem is the way that URLs are resolved by Chrome when they’re parsed from a dynamically loaded CSS blob. When you load the page, the browser loads your Webpack bundle entry JavaScript file, which … Read more