You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks a lot for your work. I have a small issue where if I create a subdirectory (in example), the resulting dart.js don't work in build (bad path to packages or missing packages link. I don't know if it is on purpose or not.
Le me explain the step to reproduce it in this repo
If i do
pub run build_runner build --output build/
node build/example/console_example.dart.js
everything works fine.
Now let's create a sub directory in example and copy console_example.dart (we have a file build/example/sub/console_example.dart'
If i do
pub run build_runner build --output build/
dart.js and node.ddc.js are compiled fine. however
node build/example/sub/console_example.dart.js
throws
annot find module '/media/files/local/dev/external/git/github.com/pulyaevskiy/node-interop/node_interop/build/example/sub/packages/$sdk/dev_compiler/common/dart_sdk'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
at Function.Module._load (internal/modules/cjs/loader.js:475:25)
at Module.require (internal/modules/cjs/loader.js:598:17)
Indeed the build/example/sub/packages link does not exist.
To note that if I build with dart2js
pub run build_runner build --output build/ --define="build_node_compilers|entrypoint=compiler=dart2js"
node build/example/sub/console_example.dart.js
it works fine
The text was updated successfully, but these errors were encountered:
DDC is important for debugging and also important if you want to generate a javascript library, to be used by other people in other contexts, since the javascript generated by DDC is perfectly readable by humans.
Note that DDC is a dev compiler, it wasn’t meant to be used in production environment, so publishing a library from DDC output may not be the best option.
Also it is still possible to debug with dart2js, if minification is turned off. Not as convenient as having code in separate js files but still.
So far I it looks like the only benefit of ddc in this context is a better debugging experience.
Thanks a lot for your work. I have a small issue where if I create a subdirectory (in example), the resulting dart.js don't work in build (bad path to packages or missing packages link. I don't know if it is on purpose or not.
Le me explain the step to reproduce it in this repo
If i do
everything works fine.
Now let's create a
sub
directory in example and copy console_example.dart (we have a file build/example/sub/console_example.dart'If i do
dart.js and node.ddc.js are compiled fine. however
throws
Indeed the
build/example/sub/packages
link does not exist.To note that if I build with dart2js
it works fine
The text was updated successfully, but these errors were encountered: