vite-plugin-require-transform
vite-plugin-require-transform copied to clipboard
A plugin for vite that convert from require syntax to import
SyntaxError: Identifier '_vite_plugin_require_transform_fruchterman' has already been declared (55:6) in /node_modules/@antv/layout/lib/layout/index.js Hello again, do you know why it happens during the project build? Thanks for your support
Here is the error when run `vite build` ``` [_vite_plugin_require_transform_] This experimental syntax requires enabling one of the following parser plugin(s): "jsx", "flow", "typescript". (25:6) error during build: SyntaxError: This...
error when starting dev server: TypeError: requireTransform is not a function
Sourcemap is likely to be incorrect: a plugin (_vite_plugin_require_transform_) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help https://rollupjs.org/guide/en/#transform
[vite_plugin_require_transform] Unexpected token (1:33) - make sure this is an expression.
 1.After introducing this plugin, packaging will report an error 2.My environment is vue3+vite 3.Hope to receive a reply as soon as possible! Thank you!
Ex1 (di in just js file): ```js let l = 'en' //'en.svg' work fine let u = require(`@assets/img/flags/${l}.svg`) //'.svg' will loss console.log(u) ``` ``` Error: Failed to load url /src/assets/img/flags/ru...
Because changes of #50 to the README had been reverted as part of https://github.com/WarrenJones/vite-plugin-require-transform/pull/50#issuecomment-1611235416 the code for the test-cases in the README isn't what the plugin does anymore since #50....
Hello, we received a dependabot security report affecting the current version of babel/traverse Is it possible to update it to 7.23.2 to fix it ?
i use this package in in vite5 ,get Uncaught ReferenceError: require is not defined ``` import requireTransform from 'vite-plugin-require-transform' requireTransform(), ```