Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Asset Copying Issue Folder Structure Flattened in Version 4.21.0 #5983

Open
3 tasks done
luisbytes opened this issue Sep 11, 2024 · 3 comments
Open
3 tasks done
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil

Comments

@luisbytes
Copy link

luisbytes commented Sep 11, 2024

Prerequisites

Stencil Version

4.21.0

Current Behavior

Files in subfolders, like assets/icons/home.svg, are copied to the top-level folder (assets/home.svg), losing the original folder structure.

Expected Behavior

The folder structure should be preserved, so assets/icons/home.svg should remain in assets/icons/home.svg.

System Info

System: node 20.15.0
    Platform: darwin (22.6.0)
   CPU Model: Apple M1 Pro (10 cpus)
    Compiler: /node_modules/.pnpm/@[email protected]/node_modules/@stencil/core/compiler/stencil.js
       Build: 1724698030
     Stencil: 4.21.0 🐷
  TypeScript: 5.5.3
      Rollup: 2.56.3
      Parse5: 7.1.2
      jQuery: 4.0.0-pre
      Terser: 5.31.1

Steps to Reproduce

  1. Create a subfolder inside assets (e.g., assets/icons/).
  2. Place a file in that subfolder (e.g., assets/icons/home.svg).
  3. Build with version 4.21.0.
  4. Observe that the file is copied to assets/home.svg instead of assets/icons/home.svg.

Code Reproduction URL

https://github.com/ionic-team/stencil

Additional Information

@tanner-reits
Copy link
Member

@luisbytes I've confirmed the issue here. In fact, I think this was causing some issues for us in Ionic Framework recently. I'll get this in our backlog so we can take a closer look. Thanks for linking those other issues as well!

@tanner-reits tanner-reits added Bug: Validated This PR or Issue is verified to be a bug within Stencil and removed triage labels Sep 12, 2024
@tanner-reits tanner-reits changed the title bug: Asset Copying Issue Folder Structure Flattened in Version 2.21.0 bug: Asset Copying Issue Folder Structure Flattened in Version 4.21.0 Sep 12, 2024
github-merge-queue bot pushed a commit to ionic-team/ionic-framework that referenced this issue Sep 16, 2024
Issue number: resolves ionic-team/stencil-ds-output-targets#476,
resolves ionic-team/stencil-ds-output-targets#475, resolves #29848

---------

<!-- 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. -->

In v0.6.0 of the [React output
target](https://www.npmjs.com/package/@stencil/react-output-target), the
implementation was changed to leverage Lit's utility for creating React
components from web components. This introduced some unforseen issues
and breaking changes.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Reverts many of the changes from
#29782 to downgrade
the React output target package to the last stable version (v0.5.3)
- Downgrades the version of Stencil to v4.20.0 (due to
ionic-team/stencil#5983 causing problems with
the downgraded output target)
- Pins these versions and prevents Renovate from attempting to upgrade
until the associated issues are resolved

## Does this introduce a breaking change?

- [ ] Yes
- [X] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

Dev build for this version: `8.3.1-dev.11726167750.15400355`

I tested the dev build against the use cases outlined in
ionic-team/stencil-ds-output-targets#475 and
ionic-team/stencil-ds-output-targets#476
github-merge-queue bot pushed a commit to ionic-team/ionic-framework that referenced this issue Sep 16, 2024
Issue number: resolves ionic-team/stencil-ds-output-targets#476,
resolves ionic-team/stencil-ds-output-targets#475, resolves #29848

---------

<!-- 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. -->

In v0.6.0 of the [React output
target](https://www.npmjs.com/package/@stencil/react-output-target), the
implementation was changed to leverage Lit's utility for creating React
components from web components. This introduced some unforseen issues
and breaking changes.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Reverts many of the changes from
#29782 to downgrade
the React output target package to the last stable version (v0.5.3)
- Downgrades the version of Stencil to v4.20.0 (due to
ionic-team/stencil#5983 causing problems with
the downgraded output target)
- Pins these versions and prevents Renovate from attempting to upgrade
until the associated issues are resolved

## Does this introduce a breaking change?

- [ ] Yes
- [X] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

Dev build for this version: `8.3.1-dev.11726167750.15400355`

I tested the dev build against the use cases outlined in
ionic-team/stencil-ds-output-targets#475 and
ionic-team/stencil-ds-output-targets#476
@Loic57
Copy link

Loic57 commented Sep 17, 2024

@luisbytes @tanner-reits Same issue here.
It looks like there is a new prop keepDirStructure for the copy task.
I used it and everything was fixed : https://stenciljs.com/docs/copy-tasks#keepdirstructure

@luisbytes
Copy link
Author

@Loic57 Apparently this solution only applies when using Copy Task in my particular case, I am using assetsdirs

brandyscarney pushed a commit to ionic-team/ionic-framework that referenced this issue Sep 17, 2024
Issue number: resolves ionic-team/stencil-ds-output-targets#476,
resolves ionic-team/stencil-ds-output-targets#475, resolves #29848

---------

<!-- 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. -->

<!-- Please describe the current behavior that you are modifying. -->

In v0.6.0 of the [React output
target](https://www.npmjs.com/package/@stencil/react-output-target), the
implementation was changed to leverage Lit's utility for creating React
components from web components. This introduced some unforseen issues
and breaking changes.

<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Reverts many of the changes from
#29782 to downgrade
the React output target package to the last stable version (v0.5.3)
- Downgrades the version of Stencil to v4.20.0 (due to
ionic-team/stencil#5983 causing problems with
the downgraded output target)
- Pins these versions and prevents Renovate from attempting to upgrade
until the associated issues are resolved

- [ ] Yes
- [X] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

Dev build for this version: `8.3.1-dev.11726167750.15400355`

I tested the dev build against the use cases outlined in
ionic-team/stencil-ds-output-targets#475 and
ionic-team/stencil-ds-output-targets#476
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil
Projects
None yet
Development

No branches or pull requests

3 participants