Git Product home page Git Product logo

esbuild-scripts's Introduction

Create Esbuild App / esbuild-scripts ๐Ÿ”ฅ

An extremely fast create-react-app replacement.


Build

What is it?

create-esbuild-app is a wrapper around create-react-app while esbuild-scripts is a react-scripts compatible CLI which can be dropped in as a replacement. They use the toolchain and development experience already provided by the Create React App ecosystem but provide an faster experience by abstracting esbuild as a bundler and using native esbuild plugins for speed.

esbuild-scripts in most cases should be a drop in replacement for react-scripts.

Creating an App

yarn create @lukesheard/esbuild-app my-app
cd my-app
yarn start

If you've previously installed create-esbuild-app globally you can run yarn global remove create-esbuild-app to remove it - this will ensure that you always use the latest version when creating a new app.

Note: The API of create-esbuild-app mirrors that of create-react-app but will default the template of a new app to TypeScript. However if you want to use a custom template you can do so by supplying a --template argument like so

yarn create @lukesheard/esbuild-app my-app --template my-template

Supplying an empty template will default to the JavaScript template from create-react-app. This is because in most instances I've noticed users default to this template anyway - so I wanted to abstract this in a way which made it simple to pick convetional defaults.

For more documentation on creating an App refer to the Create React App documentation.

esbuild-scripts's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar lukesheard avatar tgrushka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

esbuild-scripts's Issues

yarn create @lukesheard/esbuild-app my-app fails with Yarn 3.1.1

Trying to install with the latest version of yarn (3.1.1) fails with the following output:

โžœ esbuild-test git:(master) โœ— yarn create @lukesheard/esbuild-app my-app
โžค YN0000: โ”Œ Resolution step
โžค YN0000: โ”” Completed in 0s 633ms
โžค YN0000: โ”Œ Fetch step
โžค YN0013: โ”‚ color-convert@npm:2.0.1 can't be found in the cache and will be fetched from the remote registry
โžค YN0013: โ”‚ color-name@npm:1.1.4 can't be found in the cache and will be fetched from the remote registry
โžค YN0013: โ”‚ commander@npm:8.3.0 can't be found in the cache and will be fetched from the remote registry
โžค YN0013: โ”‚ has-flag@npm:4.0.0 can't be found in the cache and will be fetched from the remote registry
โžค YN0013: โ”‚ supports-color@npm:7.2.0 can't be found in the cache and will be fetched from the remote registr
โžค YN0000: โ”” Completed in 0s 452ms
โžค YN0000: โ”Œ Link step
โžค YN0000: โ”” Completed
โžค YN0000: Done in 1s 125ms

/private/var/folders/8n/sfkfwcld6hbfnnd2mtz4z58c0000gn/T/xfs-ae7701d8/dlx-91384/.pnp.cjs:9789
throw firstError;
^

Error: @lukesheard/create-esbuild-app tried to access create-react-app, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: create-react-app
Required by: @lukesheard/create-esbuild-app@npm:1.0.0 (via /Users/home/.yarn/berry/cache/@lukesheard-create-esbuild-app-npm-1.0.0-1407c85c4b-8.zip/node_modules/@lukesheard/create-esbuild-app/)

Require stack:

  • /Users/home/.yarn/berry/cache/@lukesheard-create-esbuild-app-npm-1.0.0-1407c85c4b-8.zip/node_modules/@lukesheard/create-esbuild-app/index.js
    at Function.external_module_.Module._resolveFilename (/private/var/folders/8n/sfkfwcld6hbfnnd2mtz4z58c0000gn/T/xfs-ae7701d8/dlx-91384/.pnp.cjs:9788:55)
    at Function.resolve (node:internal/modules/cjs/helpers:108:19)
    at Object. (/Users/home/.yarn/berry/cache/@lukesheard-create-esbuild-app-npm-1.0.0-1407c85c4b-8.zip/node_modules/@lukesheard/create-esbuild-app/index.js:23:34)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module.extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.external_module
    .Module._load (/private/var/folders/8n/sfkfwcld6hbfnnd2mtz4z58c0000gn/T/xfs-ae7701d8/dlx-91384/.pnp.cjs:9637:14)
    at Function.moduleExports.runMain (/private/var/folders/8n/sfkfwcld6hbfnnd2mtz4z58c0000gn/T/xfs-ae7701d8/dlx-91384/.pnp.cjs:9838:31)
    at node:internal/main/run_main_module:17:47

How to add support for SASS

I'm receiving this error:

Error:[src/index.tsx] No loader is configured for ".scss" files: src/SCSS/bundle.scss

when building. How does one go about configuring the loader for SASS files?

yarn start fails

[esbuild-scripts] Compiled successfully! [340ms]
[esbuild-scripts] Compiled successfully! [369ms]
[esbuild-scripts]
[esbuild-scripts] You can now view esbuild-app in the browser.
[esbuild-scripts]
[esbuild-scripts]   Local:            http://localhost:8000
[esbuild-scripts]   On Your Network:  http://192.168.31.128:8000
[esbuild-scripts]
[esbuild-scripts] Note that the development build is not optimized.
[esbuild-scripts] To create a production build, use yarn build.
[esbuild-scripts]
 > node_modules/@lukesheard/esbuild-scripts/build/runtime/index.js:7:22: error: Could not resolve "url" (use "platform: 'node'" when building for node)
    7 โ”‚ const url_1 = require("url");
      โ•ต                       ~~~~~

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

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.