Skip to content

Commit 40f20c4

Browse files
committed
making progress [ci skip]
1 parent 01c0f01 commit 40f20c4

4 files changed

Lines changed: 27 additions & 6 deletions

File tree

vscode/extension/.gitignore

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
node_modules
22
dist
33
out
4-
<<<<<<< HEAD
54
.vscode-test
65
*.vsix
76
LICENSE
8-
=======
9-
.vscode-test
10-
>>>>>>> c5ee2535 (progress)
7+
src_react
8+
!src_react/.gitkeep

vscode/extension/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"watch:tsc": "tsc --noEmit --watch --project tsconfig.json",
9393
"vscode:package": "vsce package --no-dependencies",
9494
"vscode:prepublish": "cp ../../LICENSE . && npm run package",
95-
"package": "npm run check-types && node esbuild.js --production"
95+
"package": "cd ../react && npm run build && cd ../extension && cp -r ../react/dist/* ./src_react && npm run check-types && node esbuild.js --production"
9696
},
9797
"dependencies": {
9898
"@types/fs-extra": "^11.0.4",

vscode/extension/src_react/.gitkeep

Whitespace-only changes.

vscode/react/vite.config.js

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,40 @@ import tailwindcss from '@tailwindcss/vite'
66

77
// https://vitejs.dev/config/
88
export default defineConfig({
9-
plugins: [TanStackRouterVite({ autoCodeSplitting: true }), viteReact(), tailwindcss()],
9+
plugins: [TanStackRouterVite({ autoCodeSplitting: false }), viteReact(), tailwindcss()],
1010
test: {
1111
globals: true,
1212
environment: "jsdom",
1313
},
14+
15+
// This is to ensure we can import the bus module from the bus folder and have nice import paths
1416
resolve: {
1517
alias: {
1618
'@': resolve(__dirname, './src'),
1719
'@bus': resolve(__dirname, '../bus/src'),
1820
},
1921
},
22+
23+
// This is to ensure that the assets are in the assets folder are all named assets/[name].[extension] rather
24+
// than having a hash.
25+
build: {
26+
// Everything below is pure Rollup syntax
27+
rollupOptions: {
28+
output: {
29+
// ── JavaScript ──────────────────────────────────────
30+
entryFileNames: 'assets/[name].js', // main-entry
31+
chunkFileNames: 'assets/[name].js', // code-splits
32+
// ── CSS & other assets ─────────────────────────────
33+
assetFileNames: ({ name }) => {
34+
// name = original file name with extension
35+
const ext = name?.substring(name.lastIndexOf('.'))
36+
return `assets/[name]${ext}` // e.g. style.css
37+
},
38+
},
39+
},
40+
},
41+
42+
// This ensures that the API calls to the server are proxied to the server.
2043
server: {
2144
proxy: {
2245
'/api': {

0 commit comments

Comments
 (0)