Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
rouzwelt committed Apr 25, 2024
1 parent 9d0f5a3 commit 22a9e8d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ repository = "https://github.com/rouzwelt/rustjs"
name = "rustjs"
path = "./src/lib.rs"

# [[bin]]
# name = "rustjs"
# path = "./src/main.rs"

[dependencies]
serde_json = "1.0.116"
futures = "0.3.30"
Expand Down
4 changes: 2 additions & 2 deletions src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ globalThis.require = __internalCreateRequire____("{}");"#,
main_worker
.js_runtime
.load_side_es_module_from_code(
&ModuleSpecifier::parse("ext:__cjsModuleLoader____")?,
&ModuleSpecifier::parse("ext:__cjsMainModuleExporter____")?,
format!(
r#"const allExports = require("{}"); export default allExports;"#,
r#"const __moduleExports____ = require("{}"); export default __moduleExports____;"#,
options.main_module_initializer.url.path()
),
)
Expand Down

0 comments on commit 22a9e8d

Please sign in to comment.