bitair-org / concurrent.js Goto Github PK
View Code? Open in Web Editor NEWNon-blocking Concurrent Computation for JavaScript RTEs (Web Browsers, Node.js & Deno & Bun)
License: MIT License
Non-blocking Concurrent Computation for JavaScript RTEs (Web Browsers, Node.js & Deno & Bun)
License: MIT License
The import.meta.url
property is a new ECMAScript spec and is not available in ES6 so esbuild has dropped its property from the bundle.
If you have the time: In the readme, Iโd find a comparison with Workerize interesting.
When trying to use it with tensorflow.js getting an error:
Browser error
Uncaught (in promise) Error: Cannot find module '@tensorflow/tfjs'
node_modules bundle.js:14
promise callback*webpackEmptyAsyncContext browser|lazy|groupOptions: {}|strict namespace object:4
load index.js:264
tsx Test.tsx:45
a async module:49
tsx bundle.js:221
factory react refresh:6
Webpack 15
__webpack_require__
fn
ts
a
ts
factory
__webpack_require__
fn
tsx
a
tsx
factory
__webpack_require__
<anonymous>
<anonymous>
browser|lazy|groupOptions: {}|strict namespace object:5
Warning from CRA
WARNING in ./node_modules/@bitair/concurrent.js/src/browser/index.js 297:53-70
Critical dependency: the request of a dependency is an expression
Environment:
"@bitair/concurrent.js": "^0.6.0",
"@tensorflow/tfjs": "^4.3.0",
"@tensorflow/tfjs-vis": "^1.5.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.9.0",
"react-scripts": "^5.0.1",
"typescript": "~4.5.4",
Trying to import like this
import * as tftypes from '@tensorflow/tfjs';
const {
// @ts-ignore
layers,
} = await concurrent.import('@tensorflow/tfjs').load();
const tfLayers: typeof tftypes.layers = layers;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.