mirror of
https://github.com/halo-dev/docs.git
synced 2025-10-20 17:48:19 +00:00
chore: use esbuild instead of babel (#358)
引入 esbuild,提升构建速度。 before: <img width="777" alt="image" src="https://github.com/halo-dev/docs/assets/21301288/49d28d76-1c10-47c8-ac8c-31b41a31f6bd"> after: <img width="888" alt="image" src="https://github.com/halo-dev/docs/assets/21301288/61462a4c-ba66-4612-9363-67e5d394601b"> /kind improvement ```release-note None ```
This commit is contained in:
@@ -254,6 +254,16 @@ const config = {
|
||||
},
|
||||
],
|
||||
],
|
||||
webpack: {
|
||||
jsLoader: (isServer) => ({
|
||||
loader: require.resolve('esbuild-loader'),
|
||||
options: {
|
||||
loader: 'tsx',
|
||||
format: isServer ? 'cjs' : undefined,
|
||||
target: isServer ? 'node12' : 'es2017',
|
||||
},
|
||||
}),
|
||||
},
|
||||
scripts: [
|
||||
{
|
||||
src: "https://analytics.halo.run/script.js",
|
||||
|
Reference in New Issue
Block a user