Closed
Description
In beta.26
, the following results in a runtime error:
// src/app/app.component.css
@import '~bootstrap/scss/bootstrap'
http://localhost:4200/~bootstrap/scss/bootstrap Failed to load resource: the server responded with a status of 404 (Not Found)
polyfills.bundle.js:6292 Unhandled Promise rejection: Failed to load ~bootstrap/scss/bootstrap ; Zone: <root> ; Task: Promise.then ; Value: Failed to load ~bootstrap/scss/bootstrap
For global styles, css-loader
is what resolves imports currently. Component styles had css-loader
added in an incorrect way, which resulted in broken CSS (fixed by @clydin in #3511).
Using 'exports-loader?module.exports.toString()'
together with css-loader
fixes this bug, but I know @clydin is currently working in css-loader
replacement functionality via PostCSS plugins for imports, which also solves the problem so it's better to wait for that solution.