nx-plus icon indicating copy to clipboard operation
nx-plus copied to clipboard

WIP feat: nuxt3 support

Open colinscz opened this issue 1 year ago β€’ 1 comments

Current Behavior

Currently Nuxt 2 is supported, the major release for Nuxt 3 is around the corner. The future version of @nxplus/nuxt should support Nuxt 3.

Task list

  • [x] Update the schematic to generate what a npx nuxi init nuxt-app would give you (current nuxi setup - potential subject to change).
  • [x] Remove Nuxt 2, add Nuxt 3 current RC candidate πŸ—οΈ
  • [ ] Update the build/serve executor to get it serving locally with the new nuxt3 API --> potentially blocked by: https://github.com/nrwl/nx/issues/10565 and related outstanding fix: https://github.com/nrwl/nx/pull/10414
    • [ ] Static Site Generation (Nuxt 3 pending!) ❌
    • [ ] Server Side Rendering (Server) πŸ—οΈ
    • [ ] Client Side Rendering (Browser) πŸ—οΈ
  • [x] Update the schematic to get Jest unit testing working πŸ—οΈ
  • [ ] Update the schematic to verify eslint is working πŸ—οΈ
  • [ ] Update unit tests βœ…
  • [ ] Update e2e tests πŸ—οΈ
  • [ ] (Update schematics might switch to vitest)
  • [ ] (Optional): Create a migration script
  • [ ] Squash commits

Expected Behavior

Nuxt 3 support + potential migration for projects using the current nuxt 2 extension

Related Issue(s)

#236

colinscz avatar Jul 19 '22 12:07 colinscz

I think you should try changing the tsconfig.json file to use NodeNext module and module resolution in order to handle the ES Module of Nuxt 3. Then you should be able to use a Dynamic Import inside the Executor function.

{
  "extends": "../../tsconfig.base.json",
  "compilerOptions": {
    "module": "NodeNext",
    "moduleResolution": "NodeNext"
  },
  "files": [],
  "include": [],
  "references": [
    {
      "path": "./tsconfig.lib.json"
    },
    {
      "path": "./tsconfig.spec.json"
    }
  ]
}

Pekes317 avatar Aug 08 '22 03:08 Pekes317

Any news on this? It’s pretty important I think 🫀

appinteractive avatar Oct 05 '22 10:10 appinteractive

Is there any timeline for this? I am currently looking for the "right way" of adding nuxt to my vue3 nx app and it seems that this would be the best option :smiley:

dpietrzyk avatar Feb 27 '23 07:02 dpietrzyk

Update: For the ones watching, review or comment from the library authors is pending. So far no update since my last posted question and results.

I had a conversation with Daniel from the Nuxt core team around this and the official Vite plugin that Nx is currently still developing. But all very speculative and it's still unclear if this official Vite plugin could be used somehow for Nuxt3 too. If so, probably not without additional work or customization.

When @ZachJW34 or @BuckyMaler give an update on how they want to tackle the issues in this plugin here, then the next steps can be further clarified. Currently there is no timeline for this feature, if you think you have an idea on how to fix it. Feel free to add pointers here.

colinscz avatar Feb 28 '23 16:02 colinscz

I will close this PR since I haven't heard anything from the maintainers in well over a year. Plus there is an exciting development ongoing by Nx. After releasing a Nx Vue plugin support they are currently working on an official Nuxt plugin. So I guess soon this plugin here will become obsolete for Nuxt too.

Thanks to everyone who gave feedback or hints. πŸ‘πŸ½

For more information please consult Nx's latest blog post: https://blog.nrwl.io/nx-17-0-has-landed-1dad19176ff3#370a

colinscz avatar Nov 01 '23 13:11 colinscz