Using a StencilJS output in another StencilJS project
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- build-system
Research direction
Start by reviewing the core package's dist/collection output and dist/types imports described in the issue, then trace how an imported type or mixin affects the consuming StencilJS build. Establish the expected behavior for importing types or mixins without including components, and identify the relevant build or packaging tests needed to verify it.
Written by the indexing model from the issue text.
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
- Dominant language
- TypeScript
- Stars
- 13.1k
- Forks
- 855
- Avg merge
- 4h 7m
- Merged PRs (30d)
- 44
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stenciljs/core
-
Stencil v5
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Stencil v5
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Bug: Validated Stencil v5
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Feature: Want this? Upvote it!
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Feature: Want this? Upvote it!
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·