Skip to content

fix: remove transformedCSS <style> wrap#129

Merged
harlan-zw merged 1 commit intowindicss:mainfrom
nkxrb:nkxrb-fix-hasherror
Sep 14, 2023
Merged

fix: remove transformedCSS <style> wrap#129
harlan-zw merged 1 commit intowindicss:mainfrom
nkxrb:nkxrb-fix-hasherror

Conversation

@nkxrb
Copy link
Contributor

@nkxrb nkxrb commented May 9, 2023

<style${meta}>\n${transformedCSS}\n</style>

This writing breaks the source structure, resulting in generated hash inconsistencies, resulting in incorrect scopeId matching in vue。

so, I remove '\n' in <style${meta}>\n${transformedCSS}\n</style>

`<style${meta}>\n${transformedCSS}\n</style>`

This writing breaks the source structure, resulting in generated hash inconsistencies, resulting in incorrect scopeId matching in vue。

so, I remove '\n' in `<style${meta}>\n${transformedCSS}\n</style>`
@nkxrb nkxrb changed the title fix: transformedCSS <style> wrap fix: remove transformedCSS <style> wrap May 9, 2023
@nkxrb
Copy link
Contributor Author

nkxrb commented May 9, 2023

for example:

<style lang="scss" scoped>.list{color: red}</style>

vue will build three time
scopeId: b7d8492c rawQuery: ''
scopeId: b7d8492c rawQuery: 'vue&type=script&lang=ts&setup=true'
scopeId: b7d8492c rawQuery: 'vue&type=style&index=0&id=b7d8492c&lang=scss&scoped=true'

but installed windicss

windicss will build

<style lang="scss" scoped>\n.list{color: red}\n</style>

scopeId: 3bda2322 rawQuery: ''
scopeId: b7d8492c rawQuery: 'vue&type=script&lang=ts&setup=true'
scopeId: b7d8492c rawQuery: 'vue&type=style&index=0&id=b7d8492c&lang=scss&scoped=true'

@harlan-zw
Copy link
Member

Sorry completely missed this PR! Thank you for taking the time to fix it.

@harlan-zw harlan-zw merged commit 7593a7b into windicss:main Sep 14, 2023
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