mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 19:52:02 +00:00
refactor(export): built-in package for assets export
1. use built-in assets package to support html export 2. improve markdown export
This commit is contained in:
parent
a4630d39e4
commit
86a43618a7
16 changed files with 819 additions and 405 deletions
27
packages/cli/assets/export-html/esbuild.config.mjs
Normal file
27
packages/cli/assets/export-html/esbuild.config.mjs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
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: 'automatic',
|
||||
legalComments: 'none',
|
||||
loader: {
|
||||
'.ts': 'ts',
|
||||
'.tsx': 'tsx',
|
||||
'.js': 'jsx',
|
||||
'.jsx': 'jsx',
|
||||
'.css': 'css',
|
||||
'.svg': 'text',
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue