Closed gusterwoei closed 6 years ago
After some research, I found out that the issue is with 'whatwg-fetch' package. If any of the tsx
file is importing whatwg-fetch
and is defined as a stencil-route
, running npm run build
will cause the error.
Are you importing whatwg-fetch
? This is polyfilled out of the box with Stencil. Should just be able to execute fetch without worrying about it.
You are right! I didn't know about that, thanks!
Stencil version: (run
npm list @stencil/core
from a terminal/cmd prompt and paste output below):I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com
Current behavior: Trying to run
npm run build
, got the following result:Expected behavior:
npm run build
run successfullySteps to reproduce: Run
npm install --save-exact
Runnpm run build
Related code:
package.json