Repository navigation
Replies: 2 comments
|
I had the same problem when I used preact + vite to build libraries, which seems to be rollup's problem, and I'm looking for a solution🤕. |
0 replies
|
Finally, I solved this problem by using export default defineConfig({
build: {
// ...other build options
rollupOptions: {
external: ['preact'],
},
commonjsOptions: {
esmExternals: ['preact'],
},
},
// ...other options
})This is an option provided by the |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello everyone, I have created this component library in Preact Lib mode:
https://github.com/LogRock/pebbles
After publishing it, once I import any component from the lib I get these:
Warning in terminal
Error on browser console
I am not sure what is going on. The library uses styled-components, which might be causing issues with all the react-preact aliasing going on.
Can anyone help me?
I had a previous version of this lib in React which was working fine, I might have to just migrate everything back to react :(
All reactions