This commit is contained in:
+12
-1
@@ -5,7 +5,18 @@ import path from 'path';
|
||||
const apiProxyTarget = process.env.API_PROXY_TARGET ?? 'http://localhost:3000';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
plugins: [
|
||||
react(),
|
||||
{
|
||||
name: 'cmpp-production-build-guard',
|
||||
apply: 'build',
|
||||
configResolved(config) {
|
||||
if (!config.isProduction) {
|
||||
throw new Error('CMPP frontend builds require NODE_ENV=production; refusing a development React release.');
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
cacheDir: 'node_modules/.vite-cmpp',
|
||||
resolve: {
|
||||
alias: {
|
||||
|
||||
Reference in New Issue
Block a user