Replies: 1 comment 1 reply
-
hey, thanks for the feedback. See: https://github.com/adonisjs/inertia-starter-kit/blob/main/vite.config.ts#L12 also tweaked a bit the shipped tsconfig. See this one for example |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the official
@adonisjs/inertia
package, theresources/tsconfig.json
is setup to support import aliases,@
and~
, however, for those import aliases to work, thevite.config.ts
needs to include those aliasa in theresolve
object like such:It's easy enough to add that to the config file, but I was wondering if there was any reason that couldn't (or shouldn't) be added into the official
@adonisjs/inertia
config setup? Taking a quick look under the hood, it seems like changes would need to be made to:https://github.com/adonisjs/assembler/blob/develop/src/code_transformer/main.ts#L372-427
core/modules/ace/codemods.ts
Lines 226 to 247 in df6466d
Either those methods could be updated to add support for modifying other parts of the
vite.config.ts
file, or new functions specific to theresolve
option could be created, then once those are updated inside the configure for the inertia package an option to update the frontend import aliases could be added in too.Happy to take a stab at PRs on those if that's something that you think would be useful, but if the preferred option is to manually update the
vite.config.ts
understand that as well.Beta Was this translation helpful? Give feedback.
All reactions