From 57d0c77b37df778b0236f193f49b4a53571c06cf Mon Sep 17 00:00:00 2001 From: blam Date: Fri, 20 Oct 2023 14:03:35 +0200 Subject: [PATCH] chore: revert comments Signed-off-by: blam --- packages/cli/src/lib/bundler/server.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/cli/src/lib/bundler/server.ts b/packages/cli/src/lib/bundler/server.ts index b4d613bcb7..bd70b2b074 100644 --- a/packages/cli/src/lib/bundler/server.ts +++ b/packages/cli/src/lib/bundler/server.ts @@ -79,7 +79,7 @@ export async function serveBundle(options: ServeOptions) { const { name } = await fs.readJson(libPaths.resolveTarget('package.json')); let webpackServer: WebpackDevServer | undefined = undefined; - // let viteServer: import('vite').ViteDevServer | undefined = undefined; + let viteServer: import('vite').ViteDevServer | undefined = undefined; let latestFrontendAppConfigs: AppConfig[] = []; @@ -146,13 +146,12 @@ export async function serveBundle(options: ServeOptions) { }); if (process.env.EXPERIMENTAL_VITE) { - // const { default: vite } = await import('vite'); - // // Annoyting that this doesn't work. `package.json` is not declared in `exports`. - // // const { default: viteReact } = require('@vitejs/plugin-react'); - // const { nodePolyfills: viteNodePolyfills } = await import( - // 'vite-plugin-node-polyfills' - // ); - // const { createHtmlPlugin: viteHtml } = await import('vite-plugin-html'); + const { default: 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'); viteServer = await vite.createServer({ define: { global: 'window',