Commit 29ad6e24 authored by Timotej Leginus's avatar Timotej Leginus
Browse files

converted root paths from absolute to relative paths

parent 17c72d4b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
  "private": true,
  "type": "module",
  "scripts": {
    "build": "npm run build:ts && npm run build:single-html && npm run build:sw",
    "build": "npm run build:sw && npm run build:ts && npm run build:single-html",
    "build:ts": "tsc -p tsconfig.emit.json",
    "build:sw": "tsc -p tsconfig.sw.json",
    "build:bundle": "node ./scripts/bundle-main.mjs",
+12 −12
Original line number Diff line number Diff line
@@ -4,18 +4,18 @@
const CACHE_NAME = "tinyvisualizer-cache";

const STATIC_ASSETS = [
  "/index.html",
  "/public/manifest.json",
  "/dist/main.js",
  "/public/styles.css",
  "/public/logo192.png",
  "/public/favicon.ico",
  "/public/wasm/tinycc.js",
  "/public/wasm/tinycc.wasm",
  "/public/wasm/tinyvm.js",
  "/public/wasm/tinyvm.wasm",
  "/public/wasm/tinyas.js",
  "/public/wasm/tinyas.wasm"
  "./index.html",
  "./public/manifest.json",
  "./dist/main.js",
  "./public/styles.css",
  "./public/logo192.png",
  "./public/favicon.ico",
  "./public/wasm/tinycc.js",
  "./public/wasm/tinycc.wasm",
  "./public/wasm/tinyvm.js",
  "./public/wasm/tinyvm.wasm",
  "./public/wasm/tinyas.js",
  "./public/wasm/tinyas.wasm",
];

self.addEventListener("install", (event: ExtendableEvent) => {
+3 −4
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ type Config = {
export function register(config?: Config) {
  if ('serviceWorker' in navigator) {
    window.addEventListener('load', () => {
      const swUrl = `/service-worker.js`;
      const swUrl = `./service-worker.js`;

      if (isLocalhost) {
        // This is running on localhost. Let's check if a service worker still exists or not.
@@ -24,8 +24,7 @@ export function register(config?: Config) {
        // service worker/PWA documentation.
        navigator.serviceWorker.ready.then(() => {
          console.log(
            'This web app is being served cache-first by a service ' +
              'worker.'
            'This web app is being served cache-first by a service worker'
          );
        });
      } else {
@@ -39,7 +38,7 @@ export function register(config?: Config) {
function registerValidSW(swUrl: string, config?: Config) {
  navigator.serviceWorker
    .register(swUrl, {
        'type': 'module'
      type: 'module'
    })
    .then((registration) => {
      registration.onupdatefound = () => {
+3 −0
Original line number Diff line number Diff line
@@ -16,6 +16,9 @@
    "sourceMap": true,
    "skipLibCheck": true
  },
  "exclude": [
    "src/service-worker.ts"
  ],
  "include": [
    "src/**/*.ts",
    "src/**/*.tsx",
+5 −5
Original line number Diff line number Diff line
@@ -2,14 +2,14 @@
  "compilerOptions": {
    "composite": true,
    "esModuleInterop": true,
    "module": "es2020",
    "moduleResolution": "node",
    "outDir": "dist",
    "rootDir": "src",
    "module": "node20",
    "moduleResolution": "node16",
    "outDir": "dist/",
    "rootDir": "src/",
    "lib": ["WebWorker", "ESNext"],
    "skipLibCheck": true
  },
  "include": [
  "files": [
    "src/service-worker.ts"
  ]
}
 No newline at end of file
+1 −1

File changed.

Contains only whitespace changes.

Loading