Skip to content

Commit 7d8c34e

Browse files
authored
Merge branch 'main' into docs/lcg
2 parents 87aef94 + fe36d1c commit 7d8c34e

31 files changed

Lines changed: 1273 additions & 37 deletions

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"[astro]": {
44
"editor.defaultFormatter": "astro-build.astro-vscode"
55
},
6-
"typescript.preferences.importModuleSpecifier": "relative"
6+
"typescript.preferences.importModuleSpecifier": "relative",
7+
"typescript.enablePromptUseWorkspaceTsdk": true
78
}

apps/treeshake-test/generateTests.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ async function generateTestFiles() {
4545

4646
for (const { export: exportName, from, log } of imports) {
4747
const testContent = `
48-
import { ${exportName} } from '${from}';
49-
console.log(typeof ${log});
48+
import { ${exportName} } from '${from}/$built$';
49+
console.log(${log});
5050
`;
5151

5252
const fileName = `${log}_from_${from.replaceAll('/', '')}.ts`;

apps/treeshake-test/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": "module",
77
"scripts": {
88
"generate-tests": "tsx generateTests.ts",
9-
"test": "node runTests.ts"
9+
"test": "pnpm run --filter typegpu build && node runTests.ts"
1010
},
1111
"dependencies": {
1212
"typegpu": "workspace:*",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import * as d from 'typegpu/data';
1+
import * as d from 'typegpu/data/$built$';
22

33
console.log(d);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { sizeOf } from 'typegpu/data';
1+
import { sizeOf } from 'typegpu/data/$built$';
22

33
console.log(sizeOf);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import * as d from 'typegpu/data';
1+
import * as d from 'typegpu/data/$built$';
22

33
console.log(d.sizeOf);
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import tgpu from 'typegpu';
2-
import * as d from 'typegpu/data';
3-
import * as std from 'typegpu/std';
1+
import tgpu from 'typegpu/$built$';
2+
import * as d from 'typegpu/data/$built$';
3+
import * as std from 'typegpu/std/$built$';
44

55
console.log(tgpu, d, std);
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import tgpu from 'typegpu';
2-
import * as d from 'typegpu/data';
3-
import * as std from 'typegpu/std';
1+
import tgpu from 'typegpu/$built$';
2+
import * as d from 'typegpu/data/$built$';
3+
import * as std from 'typegpu/std/$built$';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import * as std from 'typegpu/std';
1+
import * as std from 'typegpu/std/$built$';
22

33
console.log(std);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { add } from 'typegpu/std';
1+
import { add } from 'typegpu/std/$built$';
22

33
console.log(add(1, 2));

0 commit comments

Comments
 (0)