Skip to content

Commit

Permalink
build: add mako
Browse files Browse the repository at this point in the history
  • Loading branch information
lvisei committed Dec 1, 2024
1 parent 9839ebb commit 8c65c89
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
10 changes: 10 additions & 0 deletions .dumirc.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineConfig } from 'dumi';
import os from 'node:os';

export default defineConfig({
outputPath: 'docs-dist',
Expand All @@ -13,6 +14,15 @@ Powered by <a herf="https://antv.antgroup.com">AntV</a>`,
github: 'https://github.com/antvis/GPT-Vis',
},
},
// ssr:
// process.env.NODE_ENV === 'production'
// ? {
// builder: 'mako',
// }
// : false,
hash: true,
mfsu: false,
mako: ['Darwin', 'Linux'].includes(os.type()) ? {} : false,
externals: {
'mapbox-gl': 'window.mapboxgl',
'maplibre-gl': 'window.maplibregl',
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,5 @@ jspm_packages/
# Build
dist
docs-dist
server
.dumi
9 changes: 9 additions & 0 deletions mako.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"optimization": {
"skipModules": false,
"concatenateModules": false
},
"codeSplitting": {
"strategy": "auto"
}
}
10 changes: 1 addition & 9 deletions tsconfig.eslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,5 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": true
},
// paths intend to lint
"include": [
"./*.?*.ts",
"src",
// test workspace lint
"__tests__"
],
"exclude": ["node_modules", "dist"]
}
}
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
"@antv/gpt-vis": ["./src/index.ts"]
}
},
"include": ["./*.?*.ts", "src", "__tests__"],
"exclude": ["node_modules", "dist"]
}

0 comments on commit 8c65c89

Please sign in to comment.