kokoal / vite-plugin-drupal-template-hmr

A ViteJS plugin that leverage HMR API and Drupal template comments to do HMR on template update.
MIT License
2 stars 0 forks source link

import virtual module #2

Open mortona42 opened 4 weeks ago

mortona42 commented 4 weeks ago

Hi, I am trying to set this up with import 'virtual:...' in my main.js file.

With unocss, I can use import 'virtual:uno.css' and it will be included when the page loads.

With the current instructions, to set it up in Drupal, I have to set up a library dependency, or modify the html template.

Seems like there may be some adjustment needed and it would work?

kokoal commented 1 week ago

Hi, yes the actual declaration needs some adjustments, at the time I had some issues with using the virtual: notation to import it and choose to standby on that.

This module do not give any function or usage so it does make sense we don't need to use the import notation to use it. Except to simplify installation indeed.