You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a need to share css between iframe and parent. And the way I figure I would do this is use css modules + ?inline to get the parsed contents into <style> element in iframe.
This works only in dev mode, whenever I build it ?inline returns empty string.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
Describe the bug
I have a need to share css between iframe and parent. And the way I figure I would do this is use css modules +
?inline
to get the parsed contents into<style>
element in iframe.This works only in dev mode, whenever I build it
?inline
returns empty string.Works as expected (color get shared):

npm run build && npm run preview
Doesn't work as expected (iframe gets no style):

Reproduction
https://stackblitz.com/edit/vitejs-vite-qgqdy8?file=main.js&terminal=dev
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: