kuzzleio / kuzzle-device-manager

IoT Devices & Assets Management providing digital twins, payload decoding, normalized measures, provisioning. Multi-Tenant ready for white labelled and B2B2C applications.
https://docs.kuzzle.io/official-plugins/device-manager/1
Apache License 2.0
14 stars 7 forks source link

Improve packages build #312

Closed sebtiz13 closed 1 year ago

sebtiz13 commented 1 year ago

What does this PR do ?

Fix strange resolver behavior for package without main JS file, result in bug with Vite builder (and maybe other). CF: https://github.com/vitejs/vite/issues/12446

Assumption: When using import { MyType } from 'type-package', I think resolver try to resolve first in JS code before search in types. This problem does not occur when use import type { MyType } from 'type-package'; certainly because with explicit import type, the resolver search directly in types exports. So I have added an empty JS file to solve this behavior, but I think it's still better to use explicit import type (IMHO: it's also more explicit for developers readability)

Boyscout

sebtiz13 commented 1 year ago

There is an issue with functional tests

It's ok I have changed the method to exclude test code of package. I had not seen that the CI uses the built code for functional tests.