tldraw/packages/assets
David Sheldrick ade38247d8
[dotcom] Delete service worker, cache tldraw assets (#2552)
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
2024-01-19 15:31:01 +00:00
..
api-extractor.json transfer-out: transfer out 2023-04-25 12:01:25 +01:00
api-report.md Revert "Update dependencies (#1613)" (#1617) 2023-06-19 09:49:44 +00:00
CHANGELOG.md Update CHANGELOG.md [skip ci] 2024-01-10 12:03:59 +00:00
imports.d.ts Asset improvements (#1557) 2023-06-09 11:43:01 +00:00
imports.js Use custom font (#2343) 2023-12-19 14:17:45 +00:00
imports.vite.d.ts [dotcom] Delete service worker, cache tldraw assets (#2552) 2024-01-19 15:31:01 +00:00
imports.vite.js [dotcom] Delete service worker, cache tldraw assets (#2552) 2024-01-19 15:31:01 +00:00
LICENSE.md Change licenses to tldraw (#2167) 2023-12-19 10:41:01 +00:00
modules.d.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
package.json [dotcom] Delete service worker, cache tldraw assets (#2552) 2024-01-19 15:31:01 +00:00
README.md Fix trademark links (#2380) 2023-12-26 09:22:04 +00:00
selfHosted.d.ts Asset improvements (#1557) 2023-06-09 11:43:01 +00:00
selfHosted.js Use custom font (#2343) 2023-12-19 14:17:45 +00:00
tsconfig.json [dotcom] Delete service worker, cache tldraw assets (#2552) 2024-01-19 15:31:01 +00:00
types.d.ts Lokalise: Translations update (#2342) 2023-12-19 10:33:17 +00:00
urls.d.ts Asset improvements (#1557) 2023-06-09 11:43:01 +00:00
urls.js Use custom font (#2343) 2023-12-19 14:17:45 +00:00
utils.d.ts Asset improvements (#1557) 2023-06-09 11:43:01 +00:00
utils.js Asset improvements (#1557) 2023-06-09 11:43:01 +00:00

@tldraw/assets

This package contains assets that are used by tldraw, including icons and fonts.

Community

Have questions, comments or feedback? Join our discord or start a discussion.

Distributions

You can find tldraw on npm here.

Contribution

Please see our contributing guide. Found a bug? Please submit an issue.

License

The tldraw source code and its distributions are provided under the tldraw license. This license does not permit commercial use.

If you wish to use this project in commercial product, you need to purchase a commercial license. Please contact us at hello@tldraw.com for more inforion about obtaining a commercial license.

Trademarks

Copyright (c) 2023-present tldraw Inc. The tldraw name and logo are trademarks of tldraw. Please see our trademark guidelines for info on acceptable usage.

Contact

Find us on Twitter at @tldraw or email hello@tldraw.com. You can also join our discord for quick help and support.