Skip to content

Commit

Permalink
fix(vite): add console.warn nx serve --prod
Browse files Browse the repository at this point in the history
Warn users when they run nx serve --prod since it is not meant to be run in production
  • Loading branch information
Nicholas Cunningham committed Dec 2, 2022
1 parent 214c6a3 commit 615b3c2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/vite/src/executors/dev-server/dev-server.impl.ts
Expand Up @@ -27,6 +27,11 @@ export default async function* viteDevServerExecutor(
} as InlineConfig
);

// TODO: (nicholas) clean up type
if (options['production']) {
console.warn('WARNING: serve is not ment to be run in production');
}

const server = await createServer(serverConfig);

const baseUrl = await runViteDevServer(server);
Expand Down

0 comments on commit 615b3c2

Please sign in to comment.