Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/dev/addons/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-restricted-imports */
export * from "./htmlMesh/index";
export * from "./msdfText/index";
export * from "./lottie/index";
3 changes: 2 additions & 1 deletion packages/dev/addons/src/lottie/lottiePlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ export class LottiePlayer {

const offscreen = this._canvas.transferControlToOffscreen();

this._worker = new Worker(new URL("./worker.ts", import.meta.url), { type: "module" });
// Use an extensionless path so Webpack resolves to .ts in dev and .js in published output
this._worker = new Worker(new URL("./worker", import.meta.url), { type: "module" });
this._worker.onmessage = (evt: MessageEvent) => {
if (evt.data.animationWidth && evt.data.animationHeight && this._canvas) {
this._canvas.style.width = `${evt.data.animationWidth}px`;
Expand Down