Skip to content

Use with Web Workers #261

@SabrinaJewson

Description

@SabrinaJewson

If this plugin is enabled and you try to import a worker like so:

const worker = new Worker(new URL('./worker.js', import.meta.url));

It will compile completely fine, but it appears that this plugin completely removes the worker when attempting to inline the scripts. This leads to a 404 in the console as the page loads, because there is no file worker.js. I think ideally this plugin would transparently inline all worker scripts asset/source-style then load them as Blobs somehow, but I don't know how feasible that is.

Environment and package version

Webpack 5.60.0, html-webpack-plugin 5.5.0, html-inline-script-webpack-plugin 2.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions