Comments (2)
but now is stable!
from bytenode.
Right now, you cannot compile the worker script that will be sent to the new Worker(filename)
function. The API now has "Stability: 1 - Experimental" index, so it's better to wait before working on a fix.
However, you can still protect your software logic. Maybe like this:
'use strict';
const bytenode = require('bytenode');
const { Worker, isMainThread } = require('worker_threads');
if (isMainThread) {
console.log('Inside the main thread..');
new Worker(__filename);
// here too you can require some protected '.jsc' files
} else {
console.log('Inside the worker..');
console.log(isMainThread);
require('./protected-script.jsc');
}
from bytenode.
Related Issues (20)
- Is there any to use it by Tampermonkey? HOT 1
- Invalid or incompatible cached data (cachedDataRejected) - NodeJS to NodeJS Test HOT 4
- cli no exitcode when compile HOT 2
- Node.js version, or v8 version? HOT 2
- load compressed bytecode HOT 11
- 开发含有native插件打包加密时,会有问题,检查过代码,怀疑是bytenode的问题 HOT 1
- Electron crashes on any undefined value HOT 15
- Error: Invalid or incompatible cached data (cachedDataRejected) HOT 7
- ncc
- feat: Accept path to Electron as a compile argument
- bug: Electron builds use 2 subprocesses
- Source map support to trace production errors HOT 5
- Error: cannot find module 'node:assert/strict' HOT 11
- WDIO8/Bytenode compatibility regression
- 1.5.2 bug ': No such file or directory HOT 1
- toString issue clarification HOT 1
- Can "fixBytecode" done when complie?
- BIG problem: v1.5.4 CLI doesn't work on linux! HOT 11
- Compiling with a file pattern *.js does not work on Windows HOT 2
- 这也许是一个bug
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bytenode.