You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched for existing issues that already report this problem, without success.
Stencil Version
3.4.1
Current Behavior
TSConfig alias paths such as @utils/helper are not being transpiled to their relative paths (i.e. ../../utils/helpers) on build, resulting in warning when consuming the collection target:
[ WARN ] Bundling Warning UNRESOLVED_IMPORT
'@utils/helpers' is imported by
node_modules/@ionic/core/dist/collection/components/datetime-button/datetime-button.js, but could not be
resolved – treating it as an external dependency
Expected Behavior
I expect there to be no warning.
System Info
System: node 16.19.0
Platform: darwin (22.2.0)
CPU Model: Apple M1 Pro (8 cpus)
Compiler: /Users/liamdebeasi/Ionic/ionic/core/node_modules/@stencil/core/compiler/stencil.js
Build: 1687785553
Stencil: 3.4.1 🐨
TypeScript: 5.0.4
Rollup: 2.42.3
Parse5: 7.1.2
Sizzle: 2.42.3
Terser: 5.18.1
Issue number: resolves#27762
---------
<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->
<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->
## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->
Stencil 3.4.1 regressed the tsconfig alias path transpilation. This is
fixed in 4.0.0 though.
## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->
- Downgrade to Stencil 3.4.0. Stencil 4.0 has breaking changes, so I'd
like to wait on upgrading until we can work through any of the changes
that impact Ionic.
This reverts commit 9793b3c.
## Does this introduce a breaking change?
- [ ] Yes
- [x] No
<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->
## Other information
<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
Stencil issue: ionic-team/stencil#4550
@liamdebeasi So, this isn't technically a regression as the behavior in 3.4.1 is how this should behave. The problem is that the root-level transformAliasedImportPaths doesn't actually control the transformations in dist (and subsequently dist-collection that gets synthetically injected as an addition output target). For paths in this output to get transformed, you'll need to have the following in the dist target config:
We agree it's not ideal to have two flags controlling similar behavior. The plan (as of now) is that the output target specific flag will be removed in the next major release of Stencil and all path transformations will be determined by the root-level transformAliasedImportPaths flag.
The reason this is "fixed" in v4 is because transformAliasedImportPaths and transformAliasedImportPathsInCollection both now default to true.
Prerequisites
Stencil Version
3.4.1
Current Behavior
TSConfig alias paths such as
@utils/helper
are not being transpiled to their relative paths (i.e.../../utils/helpers
) on build, resulting in warning when consuming thecollection
target:Expected Behavior
I expect there to be no warning.
System Info
Steps to Reproduce
core
runnpm install && npm run build
.core/dist/collection/components/datetime-button/datetime-button.js
. Observe that@utils/helper
is still an import path at the top.npm install @stencil/[email protected]
.npm run build
.core/dist/collection/components/datetime-button/datetime-button.js
. Observe that the correct relative path is specified.Code Reproduction URL
https://github.com/ionic-team/ionic-framework
Additional Information
The text was updated successfully, but these errors were encountered: