vite-plugins icon indicating copy to clipboard operation
vite-plugins copied to clipboard

What's the correct way to import css?

Open albizures opened this issue 2 years ago • 0 comments

While using vite plugin I found out that css import from client side script were blocked by hono (or the plugin not sure really)

CleanShot 2024-01-04 at 7  40 02@2x

My workaround was to exclude css files from the plugin options, like so:

exclude: [
 ...defaultOptions.exclude,
 /(.*\.css$|.*\.css\?t=[\d]+$)/
//                      ^ also considering updates
],

Not sure if this is the best way to handle this, if so wouldn't be better to add it into the default options?

albizures avatar Jan 05 '24 01:01 albizures