-
Notifications
You must be signed in to change notification settings - Fork 12
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
Webpack and jsdom detection issue #26
Comments
@emerikool Perhaps |
What do you mean by process.browser ? |
@emerikool you can check: process.platform=undefined OR process.browser (both seem used?) |
process.platform is defined (win32) and process.browser is undefined |
@emerikool Seems like something you should figure out with the mochapack people maybe? |
I don't think it's related to mochapack, same issue should occur with webpack and any emulated browser. node_preamble.dart/lib/preamble.js Line 50 in 20c5bee
by replacing process.versions.hasOwnProperty('electron') with something matching this particular case.I did not find a valid property in process object to fit this use case that's why I suggest to add a custom one like: if ("undefined" !== typeof process && process.hasOwnProperty('forceNode') && process.versions && process.versions.hasOwnProperty('node')) {
|
Having encountered this problem, my current workaround is set |
We are facing an issue on dart sass due to environement detection.
With jsdom environment is not detected as a Node one and imports are not resolved.
Jsdom emulate a web browser by adding a window object that makes failed node detection:
node_preamble.dart/lib/preamble.js
Line 41 in 20c5bee
The text was updated successfully, but these errors were encountered: