3.4.9 • Published 1 year ago

react-esbuild v3.4.9

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

This package includes the global command for starting React and Esbuild project. \ You can install packages by following command. \ It will only take a few milliseconds. Amazing !

What is this?

This package can create react template with esbuild. \ It is similar to CRA (create-react-app) but much faster.

Install

In Node.js (version 16+), install with npm:

npx react-esbuild@latest [project-name]

or

npm i react-esbuild -g
react-esbuild [project-name]

or

recommended

bun is a fast javascript runtime and package manager. it is much more faster than node ! \ If you want to use bun, install bun at first like bellow.

In window,

powershell -c "irm bun.sh/install.ps1 | iex"

In Linux & macOS,

curl -fsSL https://bun.sh/install | bash

And then install and create project like bellow.

bunx react-esbuild [project-name]
cd [project-name]
bun install
bun run start-js (development)
bun run build-js (production)

caution

If you cannot download latest version when you use bunx, It is because bunx cache previous version.

In window, go to path bellow in windows explorer and delete react-esbuild package.

C:\Users\Administrator\AppData\Local\Temp

최신버전 다운로드 받는방법

If error occures when you try to use bunx, Follow bellow instructions.

In linux, open your terminal window and type bellow command. And then reinstall bun.

rm -rf ~/.bun

FAQ

how can i use environment variables?

Make .env file in root directory of your project. \ And Write your own environment variables like bellow. You should add REACTAPP prefix when you define variables.

REACT_APP_BASE_URL=http://127.0.0.1:8000/

And then use those in your source code like bellow.

console.log(REACT_APP_BASE_URL)

If you use version control system like git, Make .gitignore file too.

node_modules
build
.env

how can i test my project?

Make *.test.js files (App.test.js, Button.test.js etc.) inside src folder. And Write your own test code like bellow.

import { render, screen } from '@testing-library/react'
import App from './App'

describe('App', () => {
  it('renders the App component', () => {
    console.log(REACT_APP_BASE_URL)
    render(<App />)
    
    screen.debug(); // prints out the jsx in the App component unto the command line
  })
})

And then execute test files like bellow.

npm test

or

bun run test (recommended)

Does this package transfile into ES5 like Babel?

Yes. This package can transfile javascript into ES5 (old syntax) by SWC. \ SWC is like babel. But it is much more faster!

test

react-esbuild test video

3.4.9

1 year ago

3.4.8

1 year ago

3.4.7

1 year ago

3.4.6

1 year ago

3.4.5

1 year ago

3.4.4

1 year ago

3.4.3

1 year ago

3.4.2

1 year ago

3.4.1

1 year ago

2.4.1

1 year ago

2.3.1

1 year ago

2.3.0

1 year ago

2.2.9

1 year ago

2.2.8

1 year ago

2.2.7

1 year ago

2.2.6

1 year ago

2.2.5

1 year ago

2.1.5

1 year ago

2.1.4

1 year ago

2.1.3

1 year ago

2.1.2

1 year ago

2.1.1

1 year ago

2.1.0

1 year ago

2.0.9

1 year ago

2.0.8

1 year ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.4

1 year ago

2.0.3

1 year ago

1.9.3

1 year ago

1.8.3

1 year ago

1.8.2

1 year ago

1.8.1

1 year ago

1.8.0

1 year ago

1.7.9

1 year ago

1.7.8

1 year ago

1.7.7

1 year ago

1.7.6

1 year ago

1.7.5

1 year ago

1.7.4

1 year ago

1.7.3

1 year ago

1.7.2

1 year ago

1.7.1

1 year ago

1.7.0

1 year ago

1.6.9

1 year ago

1.6.8

1 year ago

1.5.8

1 year ago

1.5.7

1 year ago

1.5.6

1 year ago

1.5.5

1 year ago

1.5.4

1 year ago

1.5.3

1 year ago

1.5.2

1 year ago

1.5.1

1 year ago

1.5.0

1 year ago

1.4.9

1 year ago

1.3.9

1 year ago

1.2.9

1 year ago

1.2.8

1 year ago

1.2.7

1 year ago

1.2.6

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.0.3

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago