Skip to content

Commit

Permalink
Revert previous attempt at service worker
Browse files Browse the repository at this point in the history
  • Loading branch information
ccouzens committed Apr 17, 2024
1 parent cc142c2 commit 8841204
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
8 changes: 1 addition & 7 deletions esbuild/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

var esbuildOptions = esbuild.BuildOptions{
EntryPoints: []string{"../src/script.ts", "../src/game.ts", "../src/game/offline.worker.ts", "../public/style.css", "../public/game.css"},
EntryPoints: []string{"../src/script.ts", "../src/game.ts", "../public/style.css", "../public/game.css"},
Loader: map[string]esbuild.Loader{
".wasm": esbuild.LoaderFile,
".glsl": esbuild.LoaderFile,
Expand All @@ -21,8 +21,6 @@ var esbuildOptions = esbuild.BuildOptions{
LogLevel: esbuild.LogLevelInfo,
Bundle: true,
Sourcemap: esbuild.SourceMapLinked,
Format: esbuild.FormatESModule,
Splitting: true,
}

func compileRust() {
Expand Down Expand Up @@ -68,8 +66,6 @@ func build() {
LogLevel: esbuildOptions.LogLevel,
Bundle: esbuildOptions.Bundle,
Sourcemap: esbuildOptions.Sourcemap,
Format: esbuildOptions.Format,
Splitting: esbuildOptions.Splitting,
EntryNames: "[name]-[hash]",
AssetNames: "[name]-[hash]",
MinifyWhitespace: true,
Expand Down Expand Up @@ -118,8 +114,6 @@ func serve() {
LogLevel: esbuildOptions.LogLevel,
Bundle: esbuildOptions.Bundle,
Sourcemap: esbuildOptions.Sourcemap,
Format: esbuildOptions.Format,
Splitting: esbuildOptions.Splitting,
EntryNames: "[name]",
AssetNames: "[name]",
Outdir: "../public/",
Expand Down
2 changes: 0 additions & 2 deletions src/game/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,4 @@ export async function initialiseApp(window: WindowType) {
app.root.classList.toggle("supports-share", "share" in window.navigator);

newMaze(app);

console.log(new URL("./offline.worker.ts", import.meta.url));
}
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"compilerOptions": {
"outDir": "./public/",
"target": "ES2022",
"types": ["@webgpu/types"],
"module": "ES2022"
"types": ["@webgpu/types"]
},
"include": ["src/**/*"]
}

0 comments on commit 8841204

Please sign in to comment.