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

Feature Request - Allow same name asset directories #2615

jaredcbaum opened this issue Aug 6, 2020 · 0 comments

Feature Request - Allow same name asset directories #2615

jaredcbaum opened this issue Aug 6, 2020 · 0 comments


Copy link

@jaredcbaum jaredcbaum commented Aug 6, 2020

Stencil version:

 @stencil/core@ v1.12.2 and v1.17.3 (I know it says v1.12.2 in the picture but I updated to latest and built with the same results) 

I'm submitting a:

[ ] bug report
[X] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: or

Screenshot from 2020-08-06 10-25-42

Current behavior:
(See Screenshot)
1 -> Asset directories in two separate component folders
2 -> The build output only includes the image from the first of the two assets directories

Expected behavior:
I would like both of the components assets folders to combine under www -> build -> assets

Steps to reproduce:
Create new stencil project
Update to newest stencil version (1.17.3)
Create assets folder with image in two different component subfolders
Set the @component decorator 'assetDir' option to 'assets'
Add images to both of the 'assets' folder
Run 'npm run build' or 'npm run start'
The 'www' -> 'build' -> assets folder should now contain only the image from the first of the two 'assets' folders

Indended Use
On the new slew of ionic repos ( and getcapacitor so far), we have a src -> pages directory that contains components that represent a single page of a website. It would be nice for each of those folders to contain an 'assets' or 'img' directory so we could keep all assets together with the component styles and .tsx file. Right now the workaround is naming the asset directory some like 'assets-app-home' or 'img-app-home' so that it is unique between components.

Other information:

@ionitron-bot ionitron-bot bot added the triage label Aug 6, 2020
adamdbradley added a commit that referenced this issue Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.