Giter VIP home page Giter VIP logo

Comments (19)

cometkim avatar cometkim commented on June 20, 2024 1

this has fixed in rc.12

from nanobundle.

cometkim avatar cometkim commented on June 20, 2024 1

rc 12 is exist in @rc channel
image

try

npm uninstall nanobundle
npm install -D nanobundle@rc

from nanobundle.

cometkim avatar cometkim commented on June 20, 2024 1

Yeah, it's caused by upstream 😅

I've already submitted PR to fix that dominikg/tsconfck#73

from nanobundle.

cometkim avatar cometkim commented on June 20, 2024 1

Ah my fault, compiles are belong to dist I see

from nanobundle.

cometkim avatar cometkim commented on June 20, 2024 1

I will publish it as rc.13 soon

from nanobundle.

easylogic avatar easylogic commented on June 20, 2024 1

Oh it works fine.

The compilation result is good.

  const buttonContent = /* @__PURE__ */ React.createElement("span", null, children || "");

from nanobundle.

cometkim avatar cometkim commented on June 20, 2024

if you set jsx mode as preserve or react, you have to have import statement import * as React from 'react' at the top

from nanobundle.

easylogic avatar easylogic commented on June 20, 2024

I will try it with rc.12.

from nanobundle.

easylogic avatar easylogic commented on June 20, 2024

rc.12 is not exists in npmjs.

how to install this version?

from nanobundle.

easylogic avatar easylogic commented on June 20, 2024

@cometkim

i installed rc.12

but It is still not working .

from nanobundle.

cometkim avatar cometkim commented on June 20, 2024

Hmm let me take a look.

from nanobundle.

cometkim avatar cometkim commented on June 20, 2024

I guess it is because of tree-shaking. Can you try again with actually exporting to your module tree?

from nanobundle.

cometkim avatar cometkim commented on June 20, 2024

image
I see your Button component is compiling properly

from nanobundle.

easylogic avatar easylogic commented on June 20, 2024

it is old version compile.

from nanobundle.

easylogic avatar easylogic commented on June 20, 2024

I also found other error.
If you define "moduleResolution": "NodeNext", in tsconfig, the following error occurs.

TypeError: Cannot read properties of undefined (reading 'toLowerCase')
@react-elf/shared:build:     at result2tsconfig (file:///Users/user/github/test/react-elf/node_modules/tsconfck/dist/index.js:675:83)
@react-elf/shared:build:     at parseFile2 (file:///Users/user/github/test/react-elf/node_modules/tsconfck/dist/index.js:622:15)
@react-elf/shared:build:     at parseNative (file:///Users/user/github/test/react-elf/node_modules/tsconfck/dist/index.js:588:20)
@react-elf/shared:build:     at async it (file:///Users/user/github/test/react-elf/node_modules/nanobundle/bin.min.mjs:151:104)

from nanobundle.

cometkim avatar cometkim commented on June 20, 2024

it is old version compile.

So does it means you want to use the new jsxFactory (jsx()) from React 18?

from nanobundle.

easylogic avatar easylogic commented on June 20, 2024

I want it to be built in the form of React.createElement function.

Existing esbuild worked like that.

This worked similarly to vite, so I thought I could use it as it is.

from nanobundle.

cometkim avatar cometkim commented on June 20, 2024

rc.13 is just published

from nanobundle.

easylogic avatar easylogic commented on June 20, 2024

good.

i will test it .

from nanobundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.