Skip to content

chore: simplify vitest config and fix some build issues#1606

Merged
susnux merged 1 commit intomainfrom
chore/setup
Feb 28, 2025
Merged

chore: simplify vitest config and fix some build issues#1606
susnux merged 1 commit intomainfrom
chore/setup

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented Feb 28, 2025

Fixed issues:

  • When building with dev we were not enabling vue-devtools. This is fixed by setting NODE_ENV=development.
  • The tsconfig rootdir was not aligned with the includes section. All included files need to be within the root dir. So we now have one config for production code and one for setup and tests.
  • The config option "rollup types" will create independent type, this causes the filepicker module to be incompatible with the index module we exported. Fixed by not rolling up types (note: roll up types only works when there is only a single entry point)

Fixed issues:
- When building with `dev` we were not enabling vue-devtools.
  This is fixed by setting `NODE_ENV=development`.
- The tsconfig rootdir was not aligned with the `includes` section.
  All included files need to be within the root dir.
  So we now have one config for production code and one for
  setup and tests.
- The config option "rollup types" will create independent type,
  this causes the filepicker module to be incompatible with the index
   module we exported. Fixed by not rolling up types (note: roll up
   types only works when there is only a single entry point)

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was sure there is a way to set NODE_ENV in Vite via arg... But probably it was only available in Webpack.

Not a fun of having .env.development file just to enable devtools in dev, but it looks like it is the best cross-platform solution if we want to build on Windows as well.

@susnux susnux merged commit 10dd498 into main Feb 28, 2025
14 checks passed
@susnux susnux deleted the chore/setup branch February 28, 2025 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants