-
Notifications
You must be signed in to change notification settings - Fork 47
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
The order of imports #85
Comments
After a very quick skim of the code it seems this plugin will process all sass/scss before any css. You can import css files in sass with the |
I log the id before merging.. |
I change the code to achieve wanna I wanted... // Combine all stylesheets
let scss = ''
let last = 'must-be-last'
let lastId = null
for (const id in styles) {
console.log(id)
if (id.includes(last)) lastId = id
else scss += styles[id] || ''
}
scss += styles[lastId] || '' In my option we should have options like includeFirst:['thisOne.scss', 'thenThis'],
includeLater:['thenThisOne', 'thenThisLast'], and the scss variable would merge first the id with included
|
@thgh can you tag the issue as feature or something? 😀 |
Is there a way to control the order of css imports?
In my
app.js
I have:The output bundle css file contains first the <style> sections from all the vue files (in the order they are imported in app.js) and only then it contains bootstrap css. That of course is not good and bootstrap css has to go first so that scoped styles can override bootsrap rules if necessary.
My
rollup.config.js
looks like:Thanks.
The text was updated successfully, but these errors were encountered: