Comments (16)
We have a polyfill problem in our repos with v4.18.1. We have one repo for Stencil that generates the Web components, and another repo that consumes that repo to generate the React components. Any project that attempts to use the React components gets the following error:
export 'applyPolyfills' (imported as 'applyPolyfills') was not found in '@*******/loader' (possible exports: defineCustomElements, setNonce)
from stencil.
If I keep the same structure described in Stencil documentation to generate wrappers of Vue Components and React Components, we have a problem with Stencil 4.18.x to render these components
You can check my real code here
And I have a workaround to work with Vue3 too
In both cases I receive an error because
applyPolyfills
doesn't exist anymoreCan you help us?
@felipefialho The answer for us was just to remove all mention of applyPolyfills
from stencil.
@gavmck thanks for raising the issue.
Unfortunately I was not able to verify that exploding build 😉 I created a new Stencil project, build it with v4.14.0 and then again with v4.18.1 and everything was fine:
❯ npm i
npm WARN deprecated [email protected]: < 22.5.0 is no longer supported
added 349 packages, and audited 350 packages in 6s
38 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
❯ npm run build
> [email protected] build
> stencil build
[18:02.0] @stencil/core
[18:02.1] v4.14.0 🚡
[18:02.8] build, issue5780, prod mode, started ...
[18:02.8] transpile started ...
[18:04.0] transpile finished in 1.20 s
[18:04.0] copy started ...
[18:04.0] generate custom elements + source maps started ...
[18:04.0] generate lazy + source maps started ...
[18:04.1] copy finished (0 files) in 107 ms
[18:04.2] generate custom elements + source maps finished in 213 ms
[18:04.3] generate lazy + source maps finished in 299 ms
[18:04.3] build finished in 1.55 s
❯ rm -r node_modules/ package-lock.json
❯ npm i
npm WARN deprecated [email protected]: < 22.5.0 is no longer supported
added 349 packages, and audited 350 packages in 2s
38 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
❯ npm run build
> [email protected] build
> stencil build
[18:22.1] @stencil/core
[18:22.3] v4.18.1 🏍
[18:22.8] build, issue5780, prod mode, started ...
[18:22.9] transpile started ...
[18:24.0] transpile finished in 1.19 s
[18:24.0] copy started ...
[18:24.1] generate custom elements + source maps started ...
[18:24.1] generate lazy + source maps started ...
[18:24.1] copy finished (0 files) in 104 ms
[18:24.2] generate custom elements + source maps finished in 159 ms
[18:24.4] generate lazy + source maps finished in 287 ms
[18:24.4] build finished in 1.53 s
Can you provide a step by step description on how to reproduce the problem please?
from stencil.
Thanks for the issue! This issue has been labeled as needs reproduction
. This label is added to issues that need a code reproduction.
Please reproduce this issue in an Stencil starter component library and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.
If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.
For a guide on how to create a good reproduction, see our Contributing Guide.
from stencil.
@gavmck thanks for raising the issue.
Unfortunately I was not able to verify that exploding build 😉 I created a new Stencil project, build it with v4.14.0 and then again with v4.18.1 and everything was fine:
❯ npm i npm WARN deprecated [email protected]: < 22.5.0 is no longer supported added 349 packages, and audited 350 packages in 6s 38 packages are looking for funding run `npm fund` for details found 0 vulnerabilities ❯ npm run build > [email protected] build > stencil build [18:02.0] @stencil/core [18:02.1] v4.14.0 🚡 [18:02.8] build, issue5780, prod mode, started ... [18:02.8] transpile started ... [18:04.0] transpile finished in 1.20 s [18:04.0] copy started ... [18:04.0] generate custom elements + source maps started ... [18:04.0] generate lazy + source maps started ... [18:04.1] copy finished (0 files) in 107 ms [18:04.2] generate custom elements + source maps finished in 213 ms [18:04.3] generate lazy + source maps finished in 299 ms [18:04.3] build finished in 1.55 s ❯ rm -r node_modules/ package-lock.json ❯ npm i npm WARN deprecated [email protected]: < 22.5.0 is no longer supported added 349 packages, and audited 350 packages in 2s 38 packages are looking for funding run `npm fund` for details found 0 vulnerabilities ❯ npm run build > [email protected] build > stencil build [18:22.1] @stencil/core [18:22.3] v4.18.1 🏍 [18:22.8] build, issue5780, prod mode, started ... [18:22.9] transpile started ... [18:24.0] transpile finished in 1.19 s [18:24.0] copy started ... [18:24.1] generate custom elements + source maps started ... [18:24.1] generate lazy + source maps started ... [18:24.1] copy finished (0 files) in 104 ms [18:24.2] generate custom elements + source maps finished in 159 ms [18:24.4] generate lazy + source maps finished in 287 ms [18:24.4] build finished in 1.53 s
Can you provide a step by step description on how to reproduce the problem please?
@christian-bromann Ah sorry, it's not the build that explodes, it's the install. The previous instructions said to do this.
import { applyPolyfills, defineCustomElements } from 'my-component-library';
applyPolyfills().then(() => {
defineCustomElements();
});
Now the applyPolyfills
function does not exist unless you build for es5 so previous working installs break.
from stencil.
The type also seems to output that the function exists still
from stencil.
How do you set applyPolyfills
? Can you please provide a reproducible example? It is unknown to me what my-component-library
exports here.
from stencil.
I'll see if I can know one up. applyPolyfills
came from the stencil loader
It looks like it was removed from the docs last year and I missed it.
from stencil.
That is correct. This has been done due to the fact that Stencil stopped supporting IE, afaik. Do you think we can close this issue then?
from stencil.
Do we still need to update the type?
from stencil.
Yes, let me raise a PR for that.
from stencil.
Actually we have this planned to remove for Stencil v5.
from stencil.
@Kwooda thanks for the feedback, is there a chance you can provide a minimal reproducible example?
from stencil.
I don't know - last time I tried I got slapped by our security team, but I'll see if there's anything I can do.
from stencil.
Ideally from a new Stencil project, e.g. that you can create via npm init stencil
.
from stencil.
If I keep the same structure described in Stencil documentation to generate wrappers of Vue Components and React Components, we have a problem with Stencil 4.18.x to render these components
You can check my real code here
And I have a workaround to work with Vue3 too
In both cases I receive an error because applyPolyfills
doesn't exist anymore
![image](https://private-user-images.githubusercontent.com/3603793/336969013-bb6d58a9-d029-4b2a-8f7c-a0c154876cd8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg4OTA2MjUsIm5iZiI6MTcxODg5MDMyNSwicGF0aCI6Ii8zNjAzNzkzLzMzNjk2OTAxMy1iYjZkNThhOS1kMDI5LTRiMmEtOGY3Yy1hMGMxNTQ4NzZjZDgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYyMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MjBUMTMzMjA1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OTk1YTFlYWNjNzlkYzk0ZGQzOTM2Zjg2M2U2Njk1MGRiOWJmN2MwODk1NjY1ODBlNmFmNGUyZTk5MjU2ZjkyNiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.W245YSPjOZvbdC2fv0LGl9Ri4SPn6DxPilt4-mqwlUA)
Can you help us?
from stencil.
Related Issues (20)
- bug: watchIgnoredRegex is not respected during `stencil build --watch` HOT 2
- bug: puppeteer: piercing on level 1 breaks HOT 8
- bug: `autofocus` prop/attr is defined on other HTML attribute types instead of `HTMLAttributes` HOT 2
- bug: HOT 6
- bug: missing root element's scope id as classname in user provided children HOT 2
- Attribute ping is missing on AnchorHTMLAttributes HOT 3
- bug: Cannot read properties of undefined (reading 'isProxied') HOT 2
- bug: Stencil v4.18.1 breaks support for Jest v26 HOT 10
- bug: intermediate parents' scope ids are not reflected to the children elements HOT 3
- bug: __mocks__ copied to output target HOT 3
- bug: Cannot access uninitialized variable, only in Safari, works with dev build HOT 3
- bug: Last version 4.18.2 breaks unit test in the proyect. HOT 9
- bug: Test files copied to output target HOT 8
- bug: When i try to integrate with react application, the slot element contains hidden attribute instead of displaying the content. Note: This stencil component is using scoped element. HOT 8
- feat: Style modes load styles only when needed HOT 1
- Stencil becomes a dependency to project when installing with --legacy-peer-deps HOT 4
- bug: unable to compile using angular's standalone mode (2) HOT 1
- bug: exception in an async componentWillLoad method will break the rendering cycle HOT 2
- feat: Next.js Support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stencil.