include styles that live in node_modules
See original GitHub issueHi,
if I try to do something like
styleUrls: [
'./index.css',
'materialize-css/dist/css/materialize.css'
]
it gets turned into:
styles: [
require('./index.css'),
require('./materialize-css/dist/css/materialize.css'
]
I could just use a relative path, or import 'materialize-css/dist/css/materialize.css
but I’d rather use the styleUrls option if I could. Do you know how I could accomplish this?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:16 (4 by maintainers)
Top Results From Across the Web
Import CSS from "node_modules" in Webpack - Stack Overflow
I'd like to include them in my app's one, single CSS file, which is processed by Webpack. How can CSS files under "node_modules"...
Read more >How do I include node_modules css files? #1789 - GitHub
This way you can add src/styles/global/_base.scss , which overrides some things in Normalize.css, and all classes there will be global, without ...
Read more >Include plain CSS from node_modules in theme
I'm a bit stuck on this. A third party node_module includes styles in plain CSS, as normal. The theme only compiles .scss files....
Read more >Getting started | Primer CSS
Install the Primer CSS npm package modules by running npm install @primer/css . This will install all of the SCSS source files into...
Read more >Basic Features: Built-in CSS Support - Next.js
Next.js supports including CSS files as Global CSS or CSS Modules, using `styled-jsx` for CSS-in-JS, or any other CSS-in-JS solution! Learn more here....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I made a little hack to your loader where if I preface a style with
~
, kind of like how you would import a sass file in sass, it resolves to node_modules. So it ends up looking likeIs that something you’d be interested in? I could do a PR for that.
Hi, I’m sorry that I have not looked at this in a while. I no longer am writing angular2 applications professionally, and with the advent of angular-cli, this sort of webpack tweaking is sort of hidden from you, now. I’m closing this issue, and again I apologize for the lack of movement on it.