ade38247d8
A few things happening here - Delete our service worker. Turns out that a couple of years back browsers decided that a service worker is no longer required for a PWA so you can just have the manifest and still install on the user's device. - Cache tldraw's assets as part of the dotcom vite asset pipeline. This allows them to participate in the asset coalescing (preserving old versions of asset files so old clients don't stop working when you deploy new versions of things, see https://github.com/tldraw/brivate/pull/3132 for more context). - Add a new 'imports.vite.js' file to the assets package, because we import a bunch of json translation files, and vite imports .json files as parsed json objects instead of string urls, and there's no good way to tell it not to. Even if there was we wouldn't want to impose that config on our users. So another way to tell vite to load any asset as a url string is to append `?url` to the end of the import path. That's what this file does. closes [#2486](https://github.com/tldraw/tldraw/issues/2486) ### Change Type - [x] `minor` — New feature [^1]: publishes a `patch` release, for devDependencies use `internal` [^2]: will not publish a new version ### Release Notes - Fix 'could not load assets' error that we often see on tldraw.com after a deploy
62 lines
1.5 KiB
JSON
62 lines
1.5 KiB
JSON
{
|
|
"name": "dotcom",
|
|
"description": "The production app for tldraw.",
|
|
"version": "2.0.0-alpha.11",
|
|
"private": true,
|
|
"author": {
|
|
"name": "tldraw GB Ltd.",
|
|
"email": "hello@tldraw.com"
|
|
},
|
|
"browserslist": [
|
|
"defaults"
|
|
],
|
|
"scripts": {
|
|
"dev": "yarn run -T tsx scripts/dev-app.ts",
|
|
"build": "yarn run -T tsx scripts/build.ts",
|
|
"start": "VITE_PREVIEW=1 yarn run -T tsx scripts/dev-app.ts",
|
|
"lint": "yarn run -T tsx ../../scripts/lint.ts",
|
|
"test": "lazy inherit"
|
|
},
|
|
"dependencies": {
|
|
"@radix-ui/react-popover": "^1.0.7",
|
|
"@sentry/integrations": "^7.34.0",
|
|
"@sentry/react": "^7.77.0",
|
|
"@tldraw/assets": "workspace:*",
|
|
"@tldraw/tldraw": "workspace:*",
|
|
"@tldraw/tlsync": "workspace:*",
|
|
"@vercel/analytics": "^1.1.1",
|
|
"browser-fs-access": "^0.33.0",
|
|
"idb": "^7.1.1",
|
|
"nanoid": "4.0.2",
|
|
"qrcode": "^1.5.1",
|
|
"react": "^18.2.0",
|
|
"react-dom": "^18.2.0",
|
|
"react-helmet-async": "^1.3.0",
|
|
"react-router-dom": "^6.17.0"
|
|
},
|
|
"devDependencies": {
|
|
"@sentry/cli": "^2.25.0",
|
|
"@types/qrcode": "^1.5.0",
|
|
"@types/react": "^18.2.47",
|
|
"@typescript-eslint/utils": "^5.59.0",
|
|
"@vitejs/plugin-react-swc": "^3.5.0",
|
|
"dotenv": "^16.3.1",
|
|
"fast-glob": "^3.3.1",
|
|
"lazyrepo": "0.0.0-alpha.27",
|
|
"vite": "^5.0.0",
|
|
"ws": "^8.16.0"
|
|
},
|
|
"jest": {
|
|
"preset": "config/jest/node",
|
|
"roots": [
|
|
"<rootDir>"
|
|
],
|
|
"testEnvironment": "jsdom",
|
|
"transformIgnorePatterns": [
|
|
"node_modules/(?!(nanoid|nanoevents)/)"
|
|
],
|
|
"setupFiles": [
|
|
"./setupTests.js"
|
|
]
|
|
}
|
|
}
|