Merge pull request #24865 from marcpalm/patch-1
fix: remove async imports
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Fix issue with `esm` loaded dependencies being different from the `cjs` import for Vite dependencies
|
||||
@@ -165,12 +165,12 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
|
||||
});
|
||||
|
||||
if (process.env.EXPERIMENTAL_VITE) {
|
||||
const vite = await import('vite');
|
||||
const { default: viteReact } = await import('@vitejs/plugin-react');
|
||||
const { nodePolyfills: viteNodePolyfills } = await import(
|
||||
'vite-plugin-node-polyfills'
|
||||
);
|
||||
const { createHtmlPlugin: viteHtml } = await import('vite-plugin-html');
|
||||
const vite = require('vite');
|
||||
const { default: viteReact } = require('@vitejs/plugin-react');
|
||||
const {
|
||||
nodePolyfills: viteNodePolyfills,
|
||||
} = require('vite-plugin-node-polyfills');
|
||||
const { createHtmlPlugin: viteHtml } = require('vite-plugin-html');
|
||||
viteServer = await vite.createServer({
|
||||
define: {
|
||||
global: 'window',
|
||||
|
||||
Reference in New Issue
Block a user