Skip to content

use storybook with vue and css preprocessor #1572

@sky790312

Description

@sky790312

I face some problem with css preprocessor.
I have import global.styl in my project. How do I use it in storybook ..?

I can't import stylus file directly in here. like:
import '../assets/css/global.styl'

VM8103 preview.bundle.js:38013 Error: Module parse failed: /Users/kevin.hu/Documents/vreditor/src/assets/css/global.styl Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import url('../node_modules/bootstrap/dist/css/bootstrap.min.css')
| @import url('../node_modules/font-awesome/css/font-awesome.min.css')
| @import './variables.styl'
    at Object.<anonymous> (VM8103 preview.bundle.js:40971)
    at __webpack_require__ (VM8103 preview.bundle.js:670)
    at fn (VM8103 preview.bundle.js:88)
    at Object.<anonymous> (VM8103 preview.bundle.js:39535)
    at Object.disposed (VM8103 preview.bundle.js:39584)
    at __webpack_require__ (VM8103 preview.bundle.js:670)
    at fn (VM8103 preview.bundle.js:88)
    at loadStories (VM8103 preview.bundle.js:36872)
    at ConfigApi._renderMain (VM8103 preview.bundle.js:37881)
    at render (VM8103 preview.bundle.js:37907)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions