mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 11:41:04 +00:00
35 lines
806 B
JavaScript
35 lines
806 B
JavaScript
import { join } from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
import { dirname } from 'node:path';
|
|
|
|
const assetsDir = dirname(fileURLToPath(import.meta.url));
|
|
const srcDir = join(assetsDir, 'src');
|
|
|
|
export const buildConfig = {
|
|
entryPoints: [join(srcDir, 'main.tsx')],
|
|
bundle: true,
|
|
minify: true,
|
|
write: false,
|
|
outdir: join(assetsDir, 'dist'),
|
|
platform: 'browser',
|
|
format: 'iife',
|
|
target: ['es2018'],
|
|
jsx: 'transform',
|
|
jsxFactory: 'React.createElement',
|
|
jsxFragment: 'React.Fragment',
|
|
tsconfigRaw: {
|
|
compilerOptions: {
|
|
jsx: 'react',
|
|
},
|
|
},
|
|
external: ['react', 'react-dom', 'react-dom/client'],
|
|
legalComments: 'none',
|
|
loader: {
|
|
'.ts': 'ts',
|
|
'.tsx': 'tsx',
|
|
'.js': 'jsx',
|
|
'.jsx': 'jsx',
|
|
'.css': 'css',
|
|
'.svg': 'text',
|
|
},
|
|
};
|