Closed kooriookami closed 3 years ago
@underfin Could you please look at this?
I'm not sure the issue, can you give an reproduction for this?
I'm not sure the issue, can you give an reproduction for this?
@underfin Well, I try to make a small demo, but failed. May be it will happen in multiple style scripts. Like this:
<style lang="scss" src="../styles/common.scss"></style>
<style lang="scss" src="../styles/base.scss"></style>
<style lang="scss" scoped>
...
</style>
<style lang="scss">
...
</style>
<style lang="scss" src="../styles/dialog.scss"></style>
I print the value of descriptor.styles.length
and index
. The descriptor.styles.length
is obviously wrong. I think it may be the compiler's mistake. For workaround, I have to change scoped: !!block.scoped
to scoped: !!block?.scoped
.
If you need any other infomation, I can provide to you.
Sorry, I also can't get this error. Can you give me with detailed reproduction steps?
Sorry, I also can't get this error. Can you give me with detailed reproduction steps?
@underfin Finally, I get a demo. https://github.com/kooriookami/vite-plugin-vue2-scoped-error
clone and install
npm run build
You may try several times, somtimes it can build success, and most time it will build error.
The result of
const block = descriptor.styles[index];
could be undefined.