Closed scarhand closed 3 years ago
I am currently having the exact same problem!
Looks like the file extension changed from .js
to .esm.js
. Manually updating it in your package.json
should resolve it until this gets fixed.
@claviska Currently dist/esm/index.js file
is empty - is this correct behaviour though?
I'm not sure why the empty index is generated. The correct file uses <namespace>.js
, not index.
Stencil version:
I'm submitting a:
[x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/
Current behavior: When building a project the entry file for unpkg is not created as advertised.
The generated README mentions that the component can be included through unpkg with the following script tag
<script src='https://unpkg.com/my-component@0.0.1/dist/mycomponent.js'></script>
. That file is not generated by the build script (assuming the name is updated to reflect the project/component name). I'm not entirely sure if the hyphen is missing on purpose in the file name (mycomponent.js).In package.json the entry for unpkg is defined as
"unpkg": "dist/my-component/my-component.js"
. That file is also not generated by the build script.Expected behavior:
The stencil build script should create the file(s) necessary for unpkg.
Steps to reproduce:
npm init stencil
npm install
npm build
npm publish
Related code: Example project can be found here: Git: https://github.com/scarhand/scarhand-stencil-test Unpkg: https://unpkg.com/browse/scarhand-stencil-test@0.0.1/