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

Type support for Node16 module resolution #19606

Closed
1 of 5 tasks
danielroe opened this issue Mar 11, 2023 · 6 comments
Closed
1 of 5 tasks

Type support for Node16 module resolution #19606

danielroe opened this issue Mar 11, 2023 · 6 comments

Comments

@danielroe
Copy link
Member

Follow on from #18426.

In order to have full support for Node16 format are:

For testing:

export default defineNuxtConfig({
  typescript: {
    tsConfig: {
      compilerOptions: {
        moduleResolution: 'Node16'
      }
    }
  }
})
@Nugine
Copy link

Nugine commented Apr 2, 2023

Needs this for @hpcc-js/wasm/graphviz

@fabis94
Copy link

fabis94 commented May 10, 2023

Any updates on this?

@danielroe
Copy link
Member Author

We now support bundler module resolution mode, which you can enable with:

export default defineNuxtConfig({
  typescript: {
    tsConfig: {
      compilerOptions: {
        moduleResolution: 'bundler'
      }
    }
  }
})

This mode is meant to mirror the actual behaviour of tools like Nuxt, which means it's likely to become the new default in future. But for now we've included it in our test suite so we won't encounter regressions. I would also appreciate testing of it in real projects. It is likely to reveal dependencies in your project (for example, Nuxt modules) that also need to be updated for this TS module resolution mode.

@gjedlicska
Copy link
Contributor

Thanks @danielroe, we're testing the bundler option, so far it seams to solve our compatibly issues.

@danielroe danielroe self-assigned this May 10, 2023
@nopeless
Copy link

Works like a charm, thank you

I'm having problems with vuetify though, leaving a link here just in case someone stumbles upon this issue

Related vuetify link: vuetifyjs/vuetify#15885

@danielroe
Copy link
Member Author

We've now landed internal support for bundler module resolution in v3.5 and I think it's probably not needed to attempt Node16 mode. I'll close this as completed, but feel free to comment if there's something that you still need and we can reopen if necessary.

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

No branches or pull requests

5 participants