Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: fix loading wasm when targeting external deps #94

Merged
merged 2 commits into from
Apr 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Revert "fix: cannot resolve path when build with EXTERNAL_PATH (#93)"
This reverts commit 8ea767a.
mochaaP committed Apr 28, 2024

Verified

This commit was signed with the committer’s verified signature.
germa89 German
commit 40297f57b75544d1e3f5d48f22c353a5fb78f971
2 changes: 1 addition & 1 deletion build.js
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ if (EXTERNAL_PATH) {
let lazy;
async function init () {
if (!lazy) {
lazy = await import(require('node:url').pathToFileURL(require('node:module').createRequire('${path.join(EXTERNAL_PATH, 'dist/lexer.js')}').resolve('./lexer.mjs')));
lazy = await import(require('node:url').pathToFileURL(require('node:module').createRequire('${EXTERNAL_PATH}/dist/lexer.js').resolve('./lexer.mjs')));
}
module.exports = lazy;
return lazy.init();