bpierre / esbuild-config Goto Github PK
View Code? Open in Web Editor NEW๐ Config files for esbuild.
License: MIT License
๐ Config files for esbuild.
License: MIT License
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
}
}
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!
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
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.
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!
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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.