Skip to content

fix(app-vite&webpack): properly resolve AE script paths #18003

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

Merged

Conversation

yusufkandemir
Copy link
Member

What kind of change does this PR introduce?

  • Bugfix

Does this PR introduce a breaking change?

  • No

The PR fulfills these requirements:

  • It's submitted to the dev branch (or v[X] branch)

Other information:
Supersedes #17795

  • use / instead of join for import paths:
    • import('quasar-app-extension-foo\\dist\\index.js') is not valid. join uses the separate according to the OS
    • similar to how getPackageJson is implemented without using join
  • packagePath = (... || getPackageScriptPath(...)) would end up .../pkg-path/dist/index.js, so this.#packagePath was sometimes pointing out to src/dist, rather than the package root.
    • this.#packagePath no longer exists, so this no longer needs to be fixed with resolve(..., '..')
  • always use appDir when resolving AE scripts
  • add code comments to clarify the behavior

@DouglasCalora
Copy link

DouglasCalora commented May 13, 2025

I tested linking localy (quasar ext invoke) on projects:

  • app-vite v2: worked ✅
  • app-webpack v4: worked ✅

app-webpack v3 will no longer be supported?

Thanks for the efford!

@yusufkandemir
Copy link
Member Author

Thanks for confirming. I am hoping for another confirmation, especially from someone using Windows.

app-vite v1 and app-webpack v3 are legacy now, we won't be making more updates to them.

@eliasassuncao
Copy link

I also tested linking locally (quasar ext invoke) on Windows with the following projects:

  • app-vite v2: worked ✅
  • app-webpack v4: worked ✅

Thanks for the support!

@DouglasCalora
Copy link

Note: I did not tested this by adding extension without linkin it localy.

On app-webpack v3, I just changed to this code:

    return getPackageScriptPath(
      this.packageFullName,
      scriptName,
      appPaths.appDir
    )

And worked the link.

@DouglasCalora
Copy link

@yusufkandemir any news on releasing date? Two peope tested in windows already.

@yusufkandemir
Copy link
Member Author

@DouglasCalora I originally scheduled it last week, but other work-related stuff got in the way. For this week, I was planning to do it tomorrow. So, if everything goes as expected, I will do it tomorrow.

@DouglasCalora
Copy link

@yusufkandemir Thanks

@yusufkandemir yusufkandemir merged commit da96e74 into quasarframework:dev Jun 10, 2025
@yusufkandemir yusufkandemir deleted the fix-ae-script-path-resolution branch June 10, 2025 13:16
@yusufkandemir
Copy link
Member Author

Thanks, everyone, for cooperating!

Released in @quasar/app-vite-v2.2.1 (release) and @quasar/app-webpack-v4.2.1 (release) This is the first set of releases I did 🎉

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

Successfully merging this pull request may close these issues.

3 participants