Skip to content

Element files in root #3441

Answered by justinfagnani
bsastregx asked this question in Q&A
Nov 10, 2022 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

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 and element-2, users could import like:

import {ElementOne} from 'your-package/element-1.js';

instead of:

import {ElementOne} from 'your-package/dist/element-1.js';

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@justinfagnani
Comment options

Answer selected by bsastregx
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants