stencil
stencil copied to clipboard
Bundling warning SOURCEMAP_ERROR
Prerequisites
- [X] I have read the Contributing Guidelines.
- [X] I agree to follow the Code of Conduct.
- [X] I have searched for existing issues that already report this problem, without success.
Stencil Version
2.11.0
Current Behavior
When enabling source maps on stencil.config.ts
a warning message is shown during the build:
Expected Behavior
Source maps get built without issues.
Steps to Reproduce
- Setup a stencil component project.
- Enable source maps on
stencil.config.ts
:sourceMap: true
. - Build the project with
npm run build
.
Code Reproduction URL
https://github.com/dgonzalezr/stencil-tailwind
Additional Information
No response
Looks like this was introduced in v2.10.0, but is not present in v2.9.0. We'll take a further look!
Any update about this issue? It is still happening with the latest @stencil/core version 😐
I did some preliminary digging on this issue. It appears to:
- occur in v2.9.0 (which is the opposite of what I mentioned here)
- manifest only when more than one output target is used (e.g.
www
anddist-custom-elements
)
This leads me to believe that rollup is either reading a file that's not in a 'good state' (because it's being modified by another output target) or something similar. I don't have a definitive timeline for when we'll be able to fix this, but I promise it hasn't been forgotten about 🙂
is there any workaround for this issue?
@dgonzalezr @pratheeshp007 This seems to have been fixed in 2.18.0. I update jeep-sqlite this morning with 2.18.0 and the warning message disappears.
@dgonzalezr @pratheeshp007 @rwaskiewicz Well in fact after having done a npm start when you do a npm run build the warning message is still there
Hello there, I had the issue for a while and indeed, I'm using multiple output targets (stencil 2.18.0)
Fixed the issue by removing the dist-hydrate-script
output (https://stenciljs.com/docs/hydrate-app#how-to-use-the-hydrate-app)
I don't use it, it was it was a simple experimentation :)
Don't know if it can help, my 2 cents :
I got the warning as soon as I include the dist-custom-element
in outputTarget
. I have no warning if I remove dist-hydrate-script
as well.
Currently I work with this config :
outputTargets: [
{
type: 'dist-hydrate-script',
},
{
type: 'dist',
dir: './dist',
copy: [
{ src: 'fonts', dest: './fonts' }
]
},
{
type: 'dist-custom-elements',
dir: './dist/components'
},
{
type: 'www',
empty: false, // to prevent playground compiled css (by sass CLI) to be overriden
serviceWorker: null, // disable service workers,
copy: [
{ src: 'fonts', dest: './build/fonts' }
]
},
{
type: 'stats',
file: './dist/stats.json',
},
{
type: 'docs-vscode',
file: './dist/vscode-data.json',
},
Looks like this was introduced in v2.10.0, but is not present in v2.9.0. We'll take a further look!
Is still present in Stencil 3.1.0
Is there a roadmap on when this will be fixed?
A dev build of Stencil, 3.2.0-dev.1679942506.7994efe
has been published to npm to fix this issue. Feedback from anyone who can install and test this build out would be much appreciated!
npm install @stencil/[email protected]
The fix for this issue has been released in Stencil v3.2.1 this afternoon. As a result, I'm going to close this issue. Should it reappear, please feel free to open a new ticket. Thanks!
@rwaskiewicz Unfortunately after updating @stencil/core
the issue still remains on my side.
You can check the specific branch of this PR: https://github.com/Endava/bee-q/pull/145
Now, is true that I have multiple outputs configured on my stencil.config.js, so I wonder if the root cause could be another output different from dist-custom-elements
.
@dgonzalezr I suspect there may be a similar bug to the one that was fixed related to the dist-hydrate-script
output target. Can you do me a favor and comment out the following in your project's stencil.config.ts
and let me know if you still see the error?
{
type: 'dist-hydrate-script',
dir: 'dist/hydrate',
},
@rwaskiewicz thank you for your reply. I can confirm that removing dist-hydrate-script
makes the error to disappear 🙂
@dgonzalezr Thanks! I'm going to create a new issue here in GitHub to capture the issue with `dist-hydrate-script'
https://github.com/ionic-team/stencil/issues/4260 created
@rwaskiewicz thank you for your reply. I can confirm that removing
dist-hydrate-script
makes the error to disappear slightly_smiling_face...
The same bug can be observed if we set externalRuntime: false
for this output target.
For anyone running into this issue with dist-custom-elements
and dist-hydrate-script
set, please see https://github.com/ionic-team/stencil/issues/4260#issuecomment-1613190360
@shtolcers If you get a moment, can you please try
npm i @stencil/[email protected]
and help me confirm that fixes the issue?
Hi @rwaskiewicz
I still have the warning in 3.3.0, but I've tried the 4.0.1-dev.1688059870.bea1aeb
and it's fixed !
Hello @rwaskiewicz my apologies for the late response here.
I can confirm that the issue is fixed within the 4.0.1-dev.1688059870.bea1aeb
version
Thank you so much 🙌🏼