Skip to content

vite:css require is not defined #66

@MrVauxs

Description

@MrVauxs

Describe the bug
When attempting to use the plugin in Vite, vite errors during build from the plugin using the require() syntax.

Using commonjsOptions.transformMixedEsModules does not work, presumably since this is outside of Vite's jurisdiction.

To Reproduce
Code sandbox URL (any platform of your choice): TBD

Expected behaviour
The plugin to not block building.

Screenshots
Code_OTARe8mMq1

Desktop (please complete the following information):

  • OS: Windows
  • Version 3.7.10
  • Node v23.4.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions