Skip to content

fix(dev-mode) always add dist-types - #2402

Merged
manucorporat merged 1 commit into
stenciljs:masterfrom
bitflower:fix-2349-composite-dev-mode
May 6, 2020
Merged

manucorporat merged 1 commit into
stenciljs:masterfrom
bitflower:fix-2349-composite-dev-mode

Conversation

@bitflower

Copy link
Copy Markdown
Contributor

With the help of @simonhaenisch I could find the reason why #2349 is happening.

It is because here https://github.com/ionic-team/stencil/blob/4c70fdd2c418a1419c8c30bd585d4a081100b28b/src/compiler/config/outputs/validate-dist.ts#L47

the buildDist is false and the output target DIST_TYPES is not added in dev-mode. It is however needed later on.

This causes this condition to return false:
https://github.com/ionic-team/stencil/blob/63595bc540db9aa85295f5a8dc8738beb2a37611/src/compiler/transpile/ts-config.ts#L8

and declaration becomes false - which is not allowed in combination with composite: true.

I first tried to tackle it via this line by removing the devMode condition but it seems too related to other (global) decisions you've made maybe:
https://github.com/ionic-team/stencil/blob/253894d3ea154c0471e1345ad79fea3e708121d5/src/compiler/config/validate-config.ts#L52

So my solution is to always add the output target DIST_TYPES no matter the mode (dev or prod).

This is a huge blocker for us - would love to find a solution!

@manucorporat
manucorporat merged commit f523461 into stenciljs:master May 6, 2020
@manucorporat

Copy link
Copy Markdown
Contributor

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants