Questions tagged [microbundle]
11 questions
5
votes
4 answers
Unable to render useState, useEffect hooks in custom component package using microbundle & React
Hi I am trying to create a sample library using React 18.2.0 & Microbundle and Although library built successfully, but when it is consumed in the client app I'm getting the below error in console log:
Library source code
Below is my library…

Madpop
- 729
- 4
- 24
- 61
4
votes
0 answers
Is there any wany to configure output directory for microbundle-crl to use React lazy loading?
I was using microbundle-crl to bundle my react application code,i was getting a huge single file as a output so tried to add Lazy loading so it will generate many small chunks.but when i tried to compile i was getting the following error.
Error:…

Jagankumar
- 41
- 1
2
votes
0 answers
options error TS5089: Option 'jsxFactory' cannot be specified when option 'jsx' is 'react-jsx'
I have some public react page or component that want to share these component across all project. is it possible to share? I am trying to use Microbundle to do, seems these tool only share some ts lib, I added the package config follow the…

spark
- 663
- 1
- 5
- 18
2
votes
0 answers
Cypress Component testing for React Microbundle (Rollup) custom dev server configuration
I'm trying to setup a component testing strategy for a new react repo that we are working on here.
Based on Cypress documentation there are no useful details about how to configure component testing using a custom dev server like this.
import {…

William Oliveira
- 21
- 2
2
votes
1 answer
How to automatically restart Next.js app after an update in another library?
I have a monorepo with two apps:
The web app (Next.js)
The UI library (Tailwind, which uses Microbundle)
The only way I managed to make the web app see the changes I make to the UI library is by:
Making the changes
Rebuild the UI library (in this…

Guilherme Oderdenge
- 4,935
- 6
- 61
- 96
1
vote
1 answer
How do you configure microbundle-crl to not bundle files that are tests?
I have my tests in the same folder as my module to avoid having to jump around the tree. Is it possible to make microbundle-crl skip the test files when bundling?
I am trying to do it on my repo https://github.com/trajano/react-hooks-tests

Archimedes Trajano
- 35,625
- 19
- 175
- 265
1
vote
1 answer
Basic implementation of using microbundle not working
Please see example repo
https://github.com/inspiraller/webpack-and-microbundle
Microbundle code
mymicrobundle/src/index.js
import React from 'react'
const MyMicroBundle = ({session}) => {
return (
Session = {session}
)
}
export…
Steve Tomlin
- 3,391
- 3
- 31
- 63
1
vote
0 answers
Why does my react library bundle created with microbundle reference image assets directly instead of using require?
I have a react component library that is bundled with microbundle-crl. Now I updated a lot of dependencies to newer version (Typescript 3 → 4, react 16 → 17, etc).
Now when I bundle my library using, the generated .js file loads image assets in this…

ziggystar
- 28,410
- 9
- 72
- 124
0
votes
0 answers
the microbundle support css
I have write a public lib and now using microbundle https://github.com/developit/microbundle to build, now I found the microbundle did not build the css by default, then I tried to tweak the command like this:
"scripts": {
"build":…

Dolphin
- 29,069
- 61
- 260
- 539
0
votes
1 answer
Error: 'typeOf' is not exported by node_modules\react-is\index.js, imported by node_modules\styled-components\dist\styled-components.browser.esm.js
When I try to run, breaks in npm start (microbundle-crl --no-compress --format modern,cjs)
I've tried delete node_modules and package-lock.json and run npm i again and nothing.
react: 17.0.2
styled-components: 5.3.3
microbundle-crl: 0.13.10
Image…

Leonardo Carey
- 11
- 3
0
votes
0 answers
How can I globally include preact/hooks in my application and use it in my extension?
I am building an application in typescript/preact, which features extensions that can be installed on demand. I use preact globally, so that not every extension includes it as a dependency, but I am having problems with accessing preact/hooks from…

daangemist
- 113
- 10