build: publish frontend source maps
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import path from 'node:path';
|
||||
import { describe, it } from 'node:test';
|
||||
import { loadConfigFromFile } from 'vite';
|
||||
import { mergeViteEnv } from '../src/config/viteEnv.ts';
|
||||
|
||||
void describe('game frontend Vite config', () => {
|
||||
@@ -12,4 +14,18 @@ void describe('game frontend Vite config', () => {
|
||||
assert.equal(env.VITE_APP_BASE_PATH, '/hwe');
|
||||
assert.equal(env.VITE_GAME_API_URL, '/hwe/api/trpc');
|
||||
});
|
||||
|
||||
void it('keeps production source maps enabled', async () => {
|
||||
const configPath = path.resolve(import.meta.dirname, '../vite.config.ts');
|
||||
const loaded = await loadConfigFromFile(
|
||||
{ command: 'build', mode: 'production' },
|
||||
configPath,
|
||||
path.dirname(configPath),
|
||||
undefined,
|
||||
undefined,
|
||||
'runner'
|
||||
);
|
||||
|
||||
assert.equal(loaded?.config.build?.sourcemap, true);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user