Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I import additional SCSS from new node modules? #724

Open
jonasarcangel opened this issue Apr 24, 2019 · 0 comments
Open

How do I import additional SCSS from new node modules? #724

jonasarcangel opened this issue Apr 24, 2019 · 0 comments

Comments

@jonasarcangel
Copy link

jonasarcangel commented Apr 24, 2019

I tried importing them in _styles.scss, like this:

@import '~font-awesome/scss/font-awesome.scss';
@import '~angular-bootstrap-md/scss/bootstrap/bootstrap.scss';
@import '~angular-bootstrap-md/scss/mdb-free.scss';

But I get errors during build:

ERROR in ./ClientApp/app/app.component.scss (./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/lib/loader.js!./ClientApp/app/app.component.scss)
Module not found: Error: Can't resolve '../img/svg/arrow_right.svg' in '...'

I tried adding resolve-url-loader in webpack.addition.js, but it didn't work:
const sharedModuleRules = [
// sass
{
test: /.scss$/,
loaders: ['to-string-loader', 'css-loader', 'resolve-url-loader', 'sass-loader']
},
// font-awesome
{ test: /.(woff2?|ttf|eot|svg)$/, loader: 'url-loader?limit=10000' }
];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant