postcss / postcss-import

PostCSS plugin to inline at-import rules content
MIT License
1.38k stars 115 forks source link

Default Imports #559

Closed Xyeut closed 9 months ago

Xyeut commented 9 months ago

Hey! I'm working with nuxt3 and I have three files I'm trying to import variables, fonts, and default, ideally, I want to have variables and fonts imported in the default file, however I'm not sure how to I globally import default throughout my project

RyanZim commented 9 months ago

I'm not sure if I understand the question. You need to have an @import statement wherever you want to import something, there's no way to import a file without that.

Xyeut commented 9 months ago

@RyanZim Hey, what I'm trying to do is see if there is any postCSS setting or plug-in that allows for a file to be be imported in every other file

RyanZim commented 9 months ago

This plugin won't do that for you. However, it'd be trivial to write a plugin that inserts an @import at the top of every file, and run this plugin after it.