Element files in root #3441
-
Hi, I am new to Lit. I have cloned the Typescript starter.
I would expect this files to be in a separate folder, may be in a distribution folder, but not there, in the root. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Yeah, this is expected for that file layout. If you want your files in a folder after being built you can put them in a subfolder of The reason way do it this way here is to have simpler imports int he case where you have multiple elements in a project. So if you had import {ElementOne} from 'your-package/element-1.js'; instead of: import {ElementOne} from 'your-package/dist/element-1.js'; |
Beta Was this translation helpful? Give feedback.
-
Hi @justinfagnani , Thanks for the quick answer. |
Beta Was this translation helpful? Give feedback.
Yeah, this is expected for that file layout. If you want your files in a folder after being built you can put them in a subfolder of
src/
.The reason way do it this way here is to have simpler imports int he case where you have multiple elements in a project. So if you had
element-1
andelement-2
, users could import like:instead of: