-
-
Notifications
You must be signed in to change notification settings - Fork 835
Using a StencilJS output in another StencilJS project #6641
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already include this feature request, without success.
Describe the Feature Request
From a other StencilJS package, types, mixins, etc. can be imported using import.
Describe the Use Case
There is a core package, which is a StencilJS project containing basic components (button, table, …) and utilities.
In another StencilJS project, the type definitions, basic components, and utilities should be imported from the core package.
Currently, everything is provided in the collection folder within the dist directory of the core package.
This means that, in theory, a type definition or mixin can be imported.
import { defaultFactory } from ‘project/core/collection/mixins/default’;
import { HTMLDefaultElement } from ‘@boilerplate-stencil/core/dist/types’;
Problem
When an import is used (whether a type definition or a mixin), the core package is directly incorporated into the rest of the project, meaning components become known and are included in the build.
However, it may be that only a type definition was imported.
Describe Preferred Solution
It feels like tree shaking is missing here?
Describe Alternatives
No response
Related Code
No response
Additional Information
No response