Create workers using new webpack 5 syntax
Drop worker-loader which isn't needed anymore.
This commit is contained in:
parent
6527c6d5f7
commit
38d3536340
@ -6,7 +6,6 @@ import {
|
||||
PluginFile,
|
||||
} from "../slices/plugins";
|
||||
import store from "./store";
|
||||
import { default as Worker } from "worker-loader?filename=static/[fullhash].worker.js!../workers/PluginsLoader.worker";
|
||||
|
||||
export interface Task {
|
||||
skipParsing: boolean,
|
||||
@ -40,7 +39,7 @@ export class WorkerPool {
|
||||
|
||||
public async createWorker(): Promise<Worker> {
|
||||
return new Promise((resolve) => {
|
||||
const worker = new Worker();
|
||||
const worker = new Worker(new URL("../workers/PluginsLoader.worker.ts", import.meta.url));
|
||||
worker.onmessage = (evt: {
|
||||
data: string | PluginFile;
|
||||
}) => {
|
||||
|
325
package-lock.json
generated
325
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -33,7 +33,6 @@
|
||||
"eslint-config-next": "12.0.8",
|
||||
"next-sitemap": "^2.1.14",
|
||||
"node-fetch": "^3.2.0",
|
||||
"typescript": "4.5.4",
|
||||
"worker-loader": "3.0.8"
|
||||
"typescript": "4.5.4"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user