mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-17 21:41:03 +00:00
Fix issue with relative path in web worker (#169)
This commit is contained in:
committed by
GitHub
parent
fe1b3258d2
commit
888723eb0d
@@ -10,20 +10,7 @@ mergeInto(LibraryManager.library, {
|
|||||||
},
|
},
|
||||||
resolc_compile: function(inputPtr, inputLen) {
|
resolc_compile: function(inputPtr, inputLen) {
|
||||||
const inputJson = UTF8ToString(inputPtr, inputLen);
|
const inputJson = UTF8ToString(inputPtr, inputLen);
|
||||||
|
var revive = createRevive();
|
||||||
// Check if running in a web worker or node.js
|
|
||||||
if (typeof importScripts === 'function') {
|
|
||||||
// Running in a web worker
|
|
||||||
importScripts('./resolc.js');
|
|
||||||
var revive = createRevive()
|
|
||||||
} else if (typeof require === 'function') {
|
|
||||||
// Running in Node.js
|
|
||||||
const path = require('path');
|
|
||||||
createRevive = require(path.resolve(__dirname, './resolc.js'));
|
|
||||||
var revive = createRevive();
|
|
||||||
} else {
|
|
||||||
throw new Error('Unknown environment: Unable to load resolc.js');
|
|
||||||
}
|
|
||||||
revive.writeToStdin(inputJson);
|
revive.writeToStdin(inputJson);
|
||||||
|
|
||||||
// Call main on the new instance
|
// Call main on the new instance
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ module.exports = defineConfig({
|
|||||||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
||||||
trace: 'on-first-retry',
|
trace: 'on-first-retry',
|
||||||
},
|
},
|
||||||
timeout: 120000,
|
timeout: 480000,
|
||||||
/* Configure projects for major browsers */
|
/* Configure projects for major browsers */
|
||||||
projects: [
|
projects: [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user