19 Matching Annotations
- Jun 2021
-
stackoverflow.com stackoverflow.com
-
A really good question. Sad to realise that there is no feature equivalent for package.json to what we have in Gemfiles.
-
- May 2021
-
tmobaird.gitbooks.io tmobaird.gitbooks.io
-
nf start -j Procfile.dev
-
-
stackoverflow.com stackoverflow.com
-
github.com github.com
-
spin.atomicobject.com spin.atomicobject.com
-
It's Faster
Makefile is also faster than package.json script
-
Variables. Multiple lines. No more escaped quotation marks. Comments.
What are Makefile's advantages over package.json scripts
-
- Sep 2020
-
rollupjs.org rollupjs.orgRollup2
-
To make sure your ES modules are immediately usable by tools that work with CommonJS such as Node.js and webpack, you can use Rollup to compile to UMD or CommonJS format, and then point to that compiled version with the main property in your package.json file.
-
If your package.json file also has a module field, ES-module-aware tools like Rollup and webpack 2+ will import the ES module version directly.
-
-
codechips.me codechips.me
-
"watch:check": "svelte-check --watch"
-
- Dec 2019
-
github.com github.com
-
Neutrino only babel-compiles first party source (the JSX -> JS transformation is handled by a babel plugin). It does this because even when using the module entry in package.json, it's expected that the provided file (and it's imports) still be JS and not in some other format - ie: the only difference from the content in main should be that it can use modules syntax (that is import and export rather than require etc).
module
version compared tomain
version:only difference from the content in main should be that it can use modules syntax (that is import and export rather than require etc).
You can see the difference in this example: https://unpkg.com/browse/reactstrap@8.0.1/es/Alert.js ("module": "es/index.js": import) vs. https://unpkg.com/browse/reactstrap@8.0.1/lib/Alert.js ("main": "lib/index.js": require)
-
-
github.com github.com
-
browser
-
module
-
esnext
-
-
-
2ality.com 2ality.com
-
-
browser: points to browser-specific untranspiled code
-
-
github.com github.com
-
Using the browser field in package.json allows a module author to clearly articulate which files are innapropriate for client use and provide alternatives.
-
The browser field is where the module author can hint to the bundler which elements (other modules or source files) need to be replaced when packaging.
-