dougludlow / plugin-sass

SystemJS SASS loader plugin
MIT License
52 stars 27 forks source link

Doesn't work at all. #70

Closed fa7ad closed 8 years ago

fa7ad commented 8 years ago

I just started a fresh project with jspm 0.16 and installed this plugin.

and then I tried to load a sass file using both the async and synchronous methods specified in the readme. the file doesn't seem to load and I get this error on my console log.

undefined:1 Uncaught (in promise) Error: (SystemJS) AMD module http://localhost:8080/jspm_packages/github/ded/reqwest@2.0.5/reqwest.js did not define
    TypeError: AMD module http://localhost:8080/jspm_packages/github/ded/reqwest@2.0.5/reqwest.js did not define
    Error loading http://localhost:8080/jspm_packages/github/ded/reqwest@2.0.5/reqwest.js as "github:ded/reqwest@2.0.5/reqwest.js" from http://localhost:8080/jspm_packages/github/ded/reqwest@2.0.5.js
    Error loading http://localhost:8080/app/stylesheets/heading.scss!http://localhost:8080/jspm_packages/github/mobilexag/plugin-sass@0.4.6.js as "./stylesheets/heading.scss!" from http://localhost:8080/app/index.js
screendriver commented 8 years ago

I tried following with a completely new project and everything works as expected.

installation ``` sh $ mkdir foo && cd foo $ npm init ... $ npm i -D jspm ... $ jspm init ... $ jspm install scss=sass ... ```
index.html ``` html ```
index.js ``` js import './style.scss!'; ```
style.scss ``` css body { background-color: blue; } ```

After the creation of the files above I did a simple $ browser-sync start --server and saw an empty page with a blue background.

fa7ad commented 8 years ago

Maybe it has something to do with electron. Anyway, I'm gonna try again on a completely blank project.

fa7ad commented 8 years ago

Okay I think I found the issue, electron loads the html using file:// uri. and when I try doing that with a fresh project, same thing happens.

screendriver commented 8 years ago

So I will close this because it is not plugin related. As you also can see in your output jspm complains about the reqwest library: reqwest.js did not define

fa7ad commented 8 years ago

reqwest is installed. but the issue is that electron/chrome blocks XHR requests in file:// urls

screendriver commented 8 years ago

Unfortunately I don't have any experience with electron so I'm sorry but I can't help here.