Code Monkey home page Code Monkey logo

esbuild-config's Introduction

esbuild-config's People

Contributors

bpierre 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

Watchers

 avatar  avatar  avatar  avatar

esbuild-config's Issues

configuration from package.json

Very nice project. Congratulations.
Would it be possible to get the configurations from the pachage.json?
Like this:

{
  "name": "package",
  "version": "0.2.0",
  "license": "MIT",
  "esbuild":  {
    "entry": "./index.js",
    "outfile": "./bundle.js",
    "external": ["react", "react-dom"],
    "loader": { ".js": "jsx", ".png": "base64" },
    "minify": true
  }
}

ARM64 builds

Hiya,

I am running MacOS on an M1 CPU, which is the arm64 architecture. I get the following error when I try to install deps that include esbuild-config.

% npm ci    
npm ERR! code 1
npm ERR! path /Users/aidan/dev/stedi/state/node_modules/esbuild-config
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! Unsupported platform: darwin arm64 LE

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/aidan/.npm/_logs/2021-09-27T23_17_30_176Z-debug.log

I'm not familiar enough with Rust to submit a potential PR to fix this, sorry!

Good idea

Good idea!

We could even drop the package.json:esbuildConfig and check the package.json if no esbuild.config.json is present and no file path has been passed.

For the key, I think it would be safe to use "esbuild" directly, since esbuild doesnโ€™t plan to support config files.

_Originally posted by @bpierre in htt

[feature-request] Extend config

Would it be possible to add an "extend" property? I am trying to set up a monorepo with esbuild and this would make most common configuration very easy.

Pull esbuild configuration from package.json entry

New Feature

For extra convenience (and to reduce the clutter of yet another project configuration file), add support for storing the esbuild configuration directly in the project's package.json file.

Something like:

package.json

  ...
  "esbuildConfig": {
    "entry": "./index.js",
    "outfile": "./bundle.js",
    "external": ["react", "react-dom"],
    "loader": { ".js": "jsx", ".png": "base64" },
    "minify": true
  },
  "scripts": {
    "build": "esbuild $(esbuild-config package.json:esbuildConfig)"
  },
  ...

Good idea!

Good idea!

We could even drop the package.json:esbuildConfig and check the package.json if no esbuild.config.json is present and no file path has been passed.

For the key, I think it would be safe to use "esbuild" directly, since esbuild doesnโ€™t plan to support config files.

Originally posted by @bpierre in #5 (comment)

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.