Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

About the <style> tag. #132

Closed
Closed
@hejianxian

Description

@hejianxian

Hi!

I used rollup-plugin-vue build my Vue components. I used Less, and then I found some problems.

If there is nothing in the style tag, just like:

<style lang="less">
// Nothing
</style>

// or have not style tag in .vue file.

Expected behavior

I want it to output an empty css file or do nothing.

Actual behavior

But, when i run the build command, it throw an error:

../my-component.vue with 'vue' plugin: Cannot read property 'toString' of undefined

And then, if remove the lang attribute of the style tag, it will build successfully.

<style> 
// Nothing, but it will build successfully.
</style>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions