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 12, 2022
1 parent f6a985d commit bf03359
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/vite/src/executors/dev-server/dev-server.impl.ts
Expand Up @@ -27,6 +27,10 @@ export default async function* viteDevServerExecutor(
} as InlineConfig
);

if (serverConfig.mode === 'production') {
console.warn('WARNING: serve is not meant to be run in production!');
}

const server = await createServer(serverConfig);

const baseUrl = await runViteDevServer(server);
Expand Down

0 comments on commit bf03359

Please sign in to comment.