node_preamble.dart icon indicating copy to clipboard operation
node_preamble.dart copied to clipboard

:memo: Better node.js preamble for dart2js, use it in your build system.

Results 6 node_preamble.dart issues
Sort by recently updated
recently updated
newest added

- Removes `author` now that [pub doesn't use it](https://github.com/dart-lang/site-www/issues/2029) - Replaces `homepage` with [`repository`](https://dart.dev/tools/pub/pubspec#repository) - Add a [topic](https://dart.dev/tools/pub/pubspec#topics)

- Expand SDK constraint to explicitly indicate support for Dart 3 - Replace colons for specifying optional named parameter default values with equal signs. Support for the using colons has...

Because of how the `self` variable is created, any access to `self.crypto` throws an `Uncaught TypeError: Illegal invocation` exception. This will happen when the Random.secure() constructor is called. It compiles...

help wanted

When dart-sass is run in the nw.js environment, it failed, and it looks like we need to make a special check for nw.js, just like electron https://github.com/mbullington/node_preamble.dart/blob/master/lib/preamble.js#L50 ```js process.versions.hasOwnProperty('nw') ```

https://github.com/mbullington/node_preamble.dart/blob/master/lib/preamble.dart#L9-L11 Is there a reason why the global/window is wrapped in an object? https://github.com/mbullington/node_preamble.dart/commit/327ac2e50dfce87f7f286cebff1db5c5f21a0633 introduced the change but I do not get the reason for encapsulation. Couldn't find an issue...

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...