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

.vue file <style> scss can not load #2199

Closed
rambo-panda opened this issue Oct 25, 2018 · 9 comments
Closed

.vue file <style> scss can not load #2199

rambo-panda opened this issue Oct 25, 2018 · 9 comments

Comments

@rambo-panda
Copy link

❔ Question

I don't know how to describe my problem. I hope you can patiently check the code below.

πŸ’» Code Sample

files

 start.sh
package.json
parcel/
└── sample
    β”œβ”€β”€ deps
    β”‚Β Β  └── function.scss
    β”œβ”€β”€ index.html
    └── src
        β”œβ”€β”€ app.js
        └── components
            β”œβ”€β”€ a.sh
            β”œβ”€β”€ a.vue
            β”œβ”€β”€ b.vue
            β”œβ”€β”€ c.vue
            β”œβ”€β”€ d.vue
            β”œβ”€β”€ e.vue
            β”œβ”€β”€ f.vue
            β”œβ”€β”€ g.vue
            β”œβ”€β”€ h.vue
            β”œβ”€β”€ i.vue
            β”œβ”€β”€ j.vue
            └── k.vue

index.html

<script src="./src/app.js"></script>

parce/src/app.js

const a = () => import("./components/a.vue");
const b = () => import("./components/b.vue");
const c = () => import("./components/c.vue");
const d = () => import("./components/d.vue");
const e = () => import("./components/e.vue");
const f = () => import("./components/f.vue");
const g = () => import("./components/g.vue");
const h = () => import("./components/h.vue");
const i = () => import("./components/i.vue");
const j = () => import("./components/j.vue");
const k = () => import("./components/k.vue");

parcel/src/components/*.vue

<template><div>test</div></template><style lang="scss" scoped>@import "../../deps/function.scss";.a{width:vw(10);}</style>

parcel/deps/function.scss

@function vw($px) {
  @return ($px / 750) * 100vw;
}

start.sh

#!/bin/bash

rm -rf .cache ./dist

npx parcel ./parcel/sample/index.html --log-level 4

recurring step

image

change the app.js !! normal work

const a = () => import("./components/a.vue");
const b = () => import("./components/b.vue");
const c = () => import("./components/c.vue");

image

🌍 Environment

Software Version(s)
@vue/component-compiler-utils 2.2.0
node-sass 4.9.4
parcel-bundler 1.10.3
vue 2.5.17
vue-hot-reload-api 2.3.0
vue-router 3.0.1
vue-template-compiler 2.5.17
vuex 3.0.1
Node 8.12.0
npm/Yarn npm/6.4.1
Operating System mac 10.13.6 or window10 64bit
@rambo-panda rambo-panda mentioned this issue Oct 25, 2018
@rambo-panda
Copy link
Author

When I was debug, I found there was no callback here. So parcel has been waiting for the end.

@rambo-panda
Copy link
Author

What makes me very unbelievable is why stop here

Is there a concurrency issue with the nodejs fs module?

@tangjingjing
Copy link

I have the same problem in the nodejs v10

@rambo-panda
Copy link
Author

rambo-panda commented Oct 26, 2018

use dtruss

image
await ???

@JJChu
Copy link

JJChu commented Oct 26, 2018

I have the same problem in the nodejs v10

@JJChu
Copy link

JJChu commented Oct 27, 2018

@DeMoorJasper Hello, when will you fix it?

@DeMoorJasper
Copy link
Member

@JJChu I probably won't take on this issue anytime soon.
I'm currently pretty busy with other things and within the parcel project my main focus is currently helping out with Parcel 2 as that's a bit too complex for new contributors.

If anyone wants to take on this issue feel free to do so.

@rambo-panda
Copy link
Author

When I accidentally tried dart-sass, the problem was fine.

#1509

@rambo-panda
Copy link
Author

The question of node-sass, I suspect is the conflict between await and NAPI.

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

No branches or pull requests

4 participants