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

Webpack 1 (react-create-app) + Eyeglass + Sass Loader #169

Open
westhechiang opened this issue Apr 21, 2017 · 2 comments
Open

Webpack 1 (react-create-app) + Eyeglass + Sass Loader #169

westhechiang opened this issue Apr 21, 2017 · 2 comments
Labels
package:eyeglass Related to the core eyeglass package in this monorepo.

Comments

@westhechiang
Copy link

westhechiang commented Apr 21, 2017

Hey guys, I've been working on this issue for the better part of a week and am trying to see if anyone else has experience getting Eyeglass to work with Webpack 1 and Sass Loader. Based on my research on this issue, I came across #153 and material-components/material-components-web#351, which led me to think that this should be the set up:

...
  sassLoader: eyeglass({
    includePaths: glob.sync('node_modules/@XXXXXXXX/*').map((d) => path.join(__dirname, d)),
    eyeglass: {
      // eyeglass options
      root: paths.scssPath,
      file: path.join(paths.scssPath, 'app.scss'),
      sassDir: paths.scssPath,
    }
  }),
...

Unfortunately, when i run npm start, I get a Failed to compile error:

Failed to compile.

Error in ./src/scss/app.scss
Module build failed:
@import "@eg-modules-header";
^
      File to import not found or unreadable: @eg-modules-header.
Parent style sheet: stdin
      in /Users/xxxxx/workspace/xxxxxx/test/src/scss/app.scss (line 82, column 1)
 @ ./src/scss/app.scss 4:14-180 13:2-17:4 14:20-186

Can anyone share a working example of Eyeglass + Webpack + Sass-loader?

@westhechiang
Copy link
Author

westhechiang commented Apr 21, 2017

Running DEBUG=eyeglass* npm start shows that eyeglass is in fact discovering the eyeglass modules...

  eyeglass:functions functions discovered in module  @eg-modules-header:

So it seems that even though eyeglass is discovering the eyeglass modules, sass-loader isn't able to use eyeglass's resolved paths? Head scratcher...

@strarsis
Copy link
Contributor

eyeglass with sass-loader in recent webpack: #153 (comment)

@chriseppstein chriseppstein added the package:eyeglass Related to the core eyeglass package in this monorepo. label Feb 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:eyeglass Related to the core eyeglass package in this monorepo.
Projects
None yet
Development

No branches or pull requests

3 participants