Skip to content

SASS doesn't compile with 3rd party libraries #3683

Description

@admosity

Tried looking for this issue, but couldn't find it. EDIT: Found it now #2747

Currently unable to include a sass library that imports another sass library. Need a way to expose the webpack configuration to pass in a path to include possibly.

OS?

Mac OSX (Sierra) 10.12.1

Versions.

angular-cli: 1.0.0-beta.22-1
node: 6.9.1
os: darwin x64

Repro steps.

Added this to angular-cli.json:

      "styles": [
        "styles/main.scss"
      ],

styles/main.scss imports a third party library which in itself imports a third party library foundation-sites. Look at the log below:

The log given by the failure.

Hash: 96ac501307deff050924                                                    i Time: 9373ms
chunk    {0} main.bundle.js, main.bundle.map (main) 363 kB {2} [initial]
chunk    {1} styles.bundle.js, styles.bundle.map (styles) 8.87 kB {3} [initial]
chunk    {2} vendor.bundle.js, vendor.bundle.map (vendor) 3.02 MB [initial] [rendered]
chunk    {3} inline.bundle.js, inline.bundle.map (inline) 0 bytes [entry]

ERROR in ./~/css-loader?sourcemap!./~/postcss-loader!./~/sass-loader?sourcemap!./src/styles/main.scss
Module build failed:
@import 'foundation-sites/scss/util/util';
^
      File to import not found or unreadable: foundation-sites/scss/util/util
Parent style sheet: /Users/someuser/git/projects/some-project/node_modules/some-third-party-lib/scss/some-third-party-lib.scss
      in /Users/someuser/git/projects/some-project/node_modules/some-third-party-lib/scss/some-third-party-lib.scss (line 11, column 1)
 @ ./src/styles/main.scss 4:14-186
 @ multi styles
webpack: bundle is now VALID.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions