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

cannot use ESM #181

Open
its-dibo opened this issue May 8, 2022 · 2 comments
Open

cannot use ESM #181

its-dibo opened this issue May 8, 2022 · 2 comments

Comments

@its-dibo
Copy link

its-dibo commented May 8, 2022

I reported a bug in Angular SSR, it was caused by domino that it couldn't use ESM
do you have any plan to resolve this issue?

bug details

@giy-debug
Copy link

you can use eval as a work around, when you load the library with fetch.

@Santoshah
Copy link

This is creating problem with Angular 19.

Watch mode enabled. Watching for file changes...
NOTE: Raw file sizes do not reflect development server per-request transformations.
  ➜  Local:   http://localhost:4100/
  ➜  press h + enter to show help
✘ [ERROR] /Users/santoshshah/projects/ss-19-1/node_modules/domino-ext/lib/sloppy.js: 'with' in strict mode. (10:4)

   8 |   Window_run: function _run(code, file) {
   9 |     if (file) code += '\n//@ sourceURL=' + file;
> 10 |     with(this) eval(code);
     |     ^
  11 |   },
  12 |   EventHandlerBuilder_build: function build() {
  13 |     try { [plugin angular-vite-optimize-deps-ssr]

    node_modules/domino-ext/lib/Window.js:6:21:
      6 │ var sloppy = require('./sloppy');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants