Skip to content

scss files from node modules not loading #102

@lastobelus

Description

@lastobelus

Scss files from installed node modules are not loading.

What I did:

// in index.js

import 'slick-carousel'
import "slick-carousel/slick/slick.css";
import "slick-carousel/slick/slick-theme.css";

What happened:

Error in ./~/slick-carousel/slick/slick.scss
Module parse failed: /XXXX/node_modules/slick-carousel/slick/slick.scss Unexpected token (3:0)
You may need an appropriate loader to handle this file type.
| /* Slider */
|
| .slick-slider {
|     position: relative;
|     display: block;
 @ ./src/assets/js/index.js 9:0-42
 @ multi ./~/shopify-pipeline/lib/hot-client.js ./src/assets/js/index.js

Error in ./~/slick-carousel/slick/slick-theme.scss
Module parse failed: /XXXX/node_modules/slick-carousel/slick/slick-theme.scss Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @charset "UTF-8";
|
| // Default Variables
 @ ./src/assets/js/index.js 11:0-48
 @ multi ./~/shopify-pipeline/lib/hot-client.js ./src/assets/js/index.js

Inspecting the code, this would be because node_modules is in the excludes for the sass loader. What was the rationale behind this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions