Skip to content

Commit

Permalink
ci: speed up build time
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Yu <jack.yu@suse.com>
  • Loading branch information
Yu-Jack committed Jun 18, 2024
1 parent efdc310 commit 87c9e3f
Show file tree
Hide file tree
Showing 3 changed files with 339 additions and 6 deletions.
22 changes: 22 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,28 @@ const config = {
},
},
},
webpack: {
jsLoader: (isServer) => ({
loader: require.resolve("swc-loader"),
options: {
jsc: {
parser: {
syntax: "typescript",
tsx: true,
},
target: "es2019",
transform: {
react: {
runtime: "automatic",
},
},
},
module: {
type: isServer ? "commonjs" : "es6",
},
},
}),
},
themes: ["docusaurus-theme-openapi-docs"],
presets: [
[
Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
"@docusaurus/plugin-content-pages": "^2.4.0",
"@docusaurus/plugin-debug": "^2.4.0",
"@docusaurus/preset-classic": "^2.4.0",
"@docusaurus/tsconfig": "^3.4.0",
"@mdx-js/react": "^1.6.22",
"@swc/core": "^1.6.1",
"clsx": "^1.1.1",
"docs-to-pdf": "^0.6.2",
"docusaurus-plugin-image-zoom": "^1.0.0",
Expand All @@ -38,7 +40,8 @@
"react-dom": "^18.2.0",
"remark-cli": "^11.0.0",
"remark-lint-no-dead-urls": "^1.1.0",
"remark-validate-links": "^12.1.1"
"remark-validate-links": "^12.1.1",
"swc-loader": "^0.2.6"
},
"browserslist": {
"production": [
Expand All @@ -51,5 +54,8 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"esbuild-loader": "^4.2.0"
}
}
Loading

0 comments on commit 87c9e3f

Please sign in to comment.