Parcel: .vue file <style> scss can not load

Created on 25 Oct 2018  ยท  9Comments  ยท  Source: parcel-bundler/parcel

โ” 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

Bug Confirmed Bug

All 9 comments

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

What makes me very unbelievable is why stop here

Is there a concurrency issue with the nodejs fs module?

I have the same problem in the nodejs v10

use dtruss

image
await ???

I have the same problem in the nodejs v10

@DeMoorJasper Hello, when will you fix it?

@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.

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

https://github.com/parcel-bundler/parcel/issues/1509

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Niggler picture Niggler  ยท  3Comments

mnn picture mnn  ยท  3Comments

oliger picture oliger  ยท  3Comments

urbanhop picture urbanhop  ยท  3Comments

termhn picture termhn  ยท  3Comments