Error in Vite with G6
This solution comes from GitHub User @wooodchen
If you coming up with the error like following picture shows
Please refer to GitHub Issue #2961.
You should configure two plugins: rollup-plugin-node-rosolve
and rollup-plugin-commonjs
. The warning will exist but the project will be available.
Configure plugin
in vite.config.js
:
import resolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'
// ...
export default defineConfig({
plugin: [
...,
resolve(),
commonjs(),
...
]
})