Open web-padawan opened 2 years ago
Hey @web-padawan! Version v2.1.0 is out with a new default exclude filter for this kind of inline scripts (which is called ?direct
in more recent versions of Vite)
Thank you for letting me know! I will inform my colleagues and maybe they will upgrade to new version.
Description
When
index.html
page contains<style>
tags, it is passed to the plugin and the following error occurs:Code example
index.html
vite.config.js
Workaround
Updating the
exclude
helps to ignore these CSS files:The plugin should be probably updated to ignore such CSS files, as they are not supposed to be imported from JS.