andywer / andywer/threads.js

Building React with webpack 4 and a node module that uses threads.js

Đang mở
#430 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
3.5k
Fork
173
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I'm trying to build a react website which contains a custom built node module, and I want to make use of worker threads in this node module.

I've added the react plugin to the react webpack config: plugins: [new ThreadsPlugin()] with const ThreadsPlugin = require('threads-plugin'); at the top.

Ive followed the examples and I when it comes to create a worker I get

Refused to execute script from 'http://localhost:3000/static/js/add.js' because its MIME type ('text/html') is not executable.

I'm guessing this is because it's losing the add.js file location within the webpack as when you navigate http://localhost:3000/static/js/add.js it returns a 404 web error, but I don't know how to correct for this.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.