npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@zmzhoi/babel-preset-react-app

v0.1.1

Published

Babel preset for react app.

Downloads

4

Readme

@zmzhoi/babel-preset-react-app

Babel preset for react project.

Installation

npm i -D @zmzhoi/babel-preset-react-app

Usage

.babelrc:

{
  "presets": ["@zmzhoi/babel-preset-react-app"]
}

Configuration

  • @babel/preset-env

    • No Targets 옵션이 적용되어 있습니다. (Older browsers)

    • code size를 줄이기 위해, targets 옵션을 명시하는 것을 권장합니다.

      targets 옵션을 명시할 땐, 프로젝트 root에 .browserslistrc 파일을 생성하여 쿼리를 작성할 것을 권장합니다.

    • polyfill 삽입이 허용되어 있습니다.

      {
        useBuiltIns: 'entry',
        corejs: 3,
      }

      polyfill 삽입을 원하시면 core-js@3을 설치하고 entry 파일 최상단에서 core-js를 import하세요.

      installation:

      npm install core-js@3

      then:

      import "core-js"; // top of entry file

      ❗️ process.env.BABEL_ENV 혹은 process.env.NODE_ENV 가 'test'인 경우, 테스트 환경으로 간주하고 targets 이 현재 사용하고 있는 NodeJS 버전으로 설정됩니다.

  • @babel/plugin-transform-runtime

    • code size를 줄이기 위해 @babel/plugin-transform-runtime 플러그인을 사용하고 있습니다.

      Babel helpers, regenerator 생성 구문을 재사용(re-use). from @babel/runtime package.

    • polyfill은 생성하지 않습니다.
      {
        ...
        corejs: false // <-
      }
  • @babel/preset-typescript

    • Typescript를 지원합니다.
    • Typescript 빌드 시간을 줄이기 위해 @babel/preset-typescript 를 사용합니다.
    • Webpack으로 번들링을 하는 경우 Type-Check을 위해 fork-ts-checker-webpack-plugin 플러그인을 함께 사용하세요.
  • @babel/preset-react

    • react/jsx-runtime 모듈 존재 여부를 체크합니다.
    • 존재한다면, runtime 옵션을 automatic 으로 설정합니다.
    • 존재하지 않는다면, runtime 옵션을 classic 으로 설정합니다.

LICENSE

MIT.