Skip to content

bug: (next) Missing line break before const cssModules causes module load error #1671

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

Merged
merged 1 commit into from
May 6, 2020

Conversation

weaverryan
Copy link
Contributor

Hi!

Fixes an edge case: if you have multiple style and the 2nd one is a module, it will cause a build failure:

<style lang="css">
</style>

<style module>
</style>

Internally, this builds:

import "./App.vue?vue&type=style&index=0&lang=css"const cssModules = script.__cssModules = {}
import style1 from "./App.vue?vue&type=style&index=1&module=true&lang=css"
cssModules["$style"] = style1

Notice the missing line break before const cssModules =.

Apologies for no test... but I can't seem to find any for next :).

Cheers!

@yyx990803 yyx990803 merged commit a81c432 into vuejs:next May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants