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

Separate tsconfig-file to allow ui-folders in the dev compilation (npx vendure create -template). #3015

Open
KariNarhi28 opened this issue Aug 16, 2024 · 1 comment
Labels
dx 💙 Quality of life improvements for developers P4: low Non-critical, workarounds exist

Comments

@KariNarhi28
Copy link

Is your feature request related to a problem? Please describe.
As is recommended, the UI-folders of plugins should be excluded from the tsconfig-compilation since those are compiled into the Admin UI instead of the server.

However, this creates an issue with the tsconfig settings not having having an effect on the files under ui-folder.

For example, I do not get errors for unused local variables and I do not get suggestions for imports from different packages, instead I have to manually type the imports.

Describe the solution you'd like
A new configuration that allows having the ui-folders included for development, but excluded for build.

E.g tsconfig.build.json:

{
  "extends":"./tsconfig.json",
   "exclude": [ 
      "src/plugins/**/ui/*",
       "etc..."
   ]
}

The different tsconfig-files should be then handled with tsc -p <tsconfig-file path>

In a nutshell, 3 tsconfig-files are needed:

  • One for staging/production builds.
  • Second for when running Vendure server locally with ts-node.
  • Third for easier plugin development with tsconfig-features enabled.

The last 2 would be otherwise same, but with ui-folder excluded only for the other one used with ts-node

Describe alternatives you've considered
Separate the Admin UI / plugins from the server compilation context into it's own app-project.
Might be related to the planned(?) Storefront / Admin UI SDK which should come sometime in distant future.

Additional context
With the current way of handling the exclusion of ui-folder, the plugin development is more difficult without the help of tsconfig-features.

@dlhck dlhck added dx 💙 Quality of life improvements for developers P4: low Non-critical, workarounds exist labels Sep 24, 2024
@dlhck dlhck moved this to 👀 Under consideration in Vendure OS Roadmap Sep 24, 2024
@dlhck
Copy link
Collaborator

dlhck commented Sep 24, 2024

Could be done together with #2903

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dx 💙 Quality of life improvements for developers P4: low Non-critical, workarounds exist
Projects
Status: 👀 Under consideration
Development

No branches or pull requests

2 participants