Skip to content

additionalData support for css preprocessors #520

Closed
vuejs/core
#2126
@sapphi-red

Description

@sapphi-red

Is your feature request related to a problem? Please describe.
Writing @import '/src/common.scss' on every .vue file is frustrating.

Describe the solution you'd like
Add a property to prepend scss/less code in vite.config.js just like sass-loader's additionalData.
sass-loader's additionalData options
less-loader's appendData options

Describe alternatives you've considered
I tried to prepend scss code by using transforms options of vite.config.js but the code were already preprocessed.
Adding transforms which can apply before the preprocess maybe better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions