Skip to content
Merged
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project are documented in this file. The format
follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## Unreleased

### Fixed

- Vite can bundle `@project516/ffmpeg-wasm`. The ESM build passed the
worker type as a variable, and Vite's build fails with "Expected worker
options type property to be a literal value."

## 0.17.0

### Added
Expand Down
6 changes: 3 additions & 3 deletions packages/ffmpeg/src/classes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,10 @@ export class FFmpeg {
new Worker(resolveWorkerURL(classWorkerURL), {
type: WORKER_TYPE,
}) :
// We need to duplicated the code here to enable webpack
// to bundle worker.js here.
// Duplicated so bundlers find and bundle worker.js. Vite needs a
// literal type; webpack turns it into a classic worker for UMD.
new Worker(new URL("./worker.js", import.meta.url), {
type: WORKER_TYPE,
type: "module",
});
this.#registerHandlers();
}
Expand Down
Loading