Skip to content

Commit 37e26c4

Browse files
Merge pull request #1005 from software-mansion/bug/referenceerror-cannot-access-before-initialization
fix: Tgpu=true not being applied to imports in examples
2 parents ff302ca + c45345e commit 37e26c4

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Diff for: apps/typegpu-docs/astro.config.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default defineConfig({
2323
site: 'https://docs.swmansion.com',
2424
base: 'TypeGPU',
2525
vite: {
26-
plugins: [typegpu({ include: [/tgpu=true/] })],
26+
plugins: [typegpu({ include: [/content\/examples.+\.ts/] })],
2727
},
2828
integrations: [
2929
starlight({

Diff for: apps/typegpu-docs/src/utils/examples/exampleContent.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,7 @@ const tsFilesImportFunctions: Record<
7878
string,
7979
Record<string, () => Promise<unknown>>
8080
> = pathToExampleFilesToImportMap(
81-
import.meta.glob('../../content/examples/**/*.ts', {
82-
query: '?tgpu=true',
83-
}),
81+
import.meta.glob('../../content/examples/**/*.ts'),
8482
);
8583

8684
const htmlFiles: Record<string, string> = pathToExampleKey(

0 commit comments

Comments
 (0)