-
Notifications
You must be signed in to change notification settings - Fork 14
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
Webpack build fails because of source maps #1526
Comments
Here is my analysis so far, so we have a base for discussion if needed. First of all, I've found this readme particularly useful to better understand the meaning behind the output files. How to use a component according to the docSome places in the documentation report wrong paths to import (see https://stenciljs.com/docs/v3/distribution#distribution-options and ionic-team/stencil-site#933). Other parts are talking about those ways: From CDN:
https://stenciljs.com/docs/v3/javascript .mjs extension is not used anymore, but at this one exception, it's working. Example with the internet-header: https://glitch.com/edit/#!/amethyst-teal-buffer From package:
Working example with the internet-header: https://codesandbox.io/s/elated-rgb-jyny9t?file=/src/App.vue What is this loader folder, and when should it be used?It was not clear from the start as from the following old PR and our own documentation, loader is presented as piece to make it work with bundler like Webpack: ionic-team/stencil@99add67 But if we look at https://github.com/ionic-team/stencil/blob/main/src/compiler/output-targets/readme.md, it clearly defines that it contains the lazy-loaded build. The other variant (socalled custom-element) without lazy-loading is actually described here in our doc: https://next.design-system.post.ch/?path=/story/internet-header-getting-started--page#jsdelivr Why stencil warns use to use dist index in main property of the package.jsonSo the validation can be controlled with the Questions
From that, I can make a draft PR to update our doc, I think. |
I've tryed to install and import the @swisspost/internet-header package to a vuejs 3 project, which is setup with webpack and a source-map-loader plugin installed.
If I use the suggested import in the documentation (which loads the esm-es5 module):
I unfortunately get the following error:
With the
main
module (defined in thepackage.json
) it works:The text was updated successfully, but these errors were encountered: