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

stylus import error in vite: 1.0.0-rc.1 #577

Closed
starinsun opened this issue Jul 19, 2020 · 2 comments
Closed

stylus import error in vite: 1.0.0-rc.1 #577

starinsun opened this issue Jul 19, 2020 · 2 comments

Comments

@starinsun
Copy link

Describe the bug

in vite: 1.0.0-rc.1, when I use stylus as :

import './index.styl'

or

 <style lang="stylus" scoped>
</>

stylus seems not work.

BTW in vite 1.0.0-beta.3 and @vue/compiler-sfc ^3.0.0-beta.15, everything is fine.

Reproduction

npm init vite-app project1
cd project1
npm i
npm install -D stylus

then transform index.css to index.styl, npm run dev.

System Info

@vue/compiler-sfc: 3.0.0-rc.1
vite: 1.0.0-rc.1
macos: 10.15.6
node: 12.16.1

error log

[vite] error applying css transforms: 
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at validateString (internal/validators.js:117:11)
    at Object.dirname (path.js:1128:5)
...
code: 'ERR_INVALID_ARG_TYPE'
@phanmn
Copy link

phanmn commented Jul 19, 2020

Temporary workaround:
Go to file "node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js" at line 886.
Change options.fileName to options.filename

@yyx990803
Copy link
Member

Closed via PR in vue-next

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants