loynoir

Results 97 comments of loynoir

Are there any CDN provide rollup browser ESM build? 🤔 Seems not on `jsdelivr`

https://cdn.skypack.dev/rollup @shellscape @lukastaegert ```txt /* * [Package Error] "[email protected]" could not be built. * * [1/5] Verifying package is valid… * [2/5] Installing dependencies from npm… * [3/5] Building package...

@lukastaegert AFAIK, `Skypack` is a fully ESM cdn. Seems, they build a tool call [esinstall](https://www.npmjs.com/package/esinstall) to let everything ESM. But the meta of rollup is somehow not compact with esintall?...

fetch - node >=17.5.0 has `--experimental-fetch`, which is using undici - node >= 16, has undici support - node < 16, maybe fallback to node-fetch https://nodejs.org/en/blog/release/v17.5.0/ > Adds experimental support...

[rollup pure](https://rollupjs.org/guide/en/) [esbuild pure](https://esbuild.github.io/api/#pure) [webpack pure](https://webpack.js.org/guides/tree-shaking/#mark-the-file-as-side-effect-free) [uglify pure](https://github.com/mishoo/UglifyJS/blob/master/README.md#command-line-options) Both 2 seems equal. I choose the one has more google result `/*@__PURE__*/`. Set `sideEffects` should work too in most situations.

### Scenario `app` depends on a standalone bundlized library `lib`. `lib` depends on `js-yaml`. ### Plan A: pure comment * Tested: Yes, it works. * Plan All `js-yaml` top level...

@puzrin I'm no expert. Someday I look some source code, found some magic comments, and did some search. (sorry, forget which project) I have some thinks, but no guarantee if...

> How do you find, which functions should be marked? For short, I think 1. top-level code, 2. ast parser thinks this kind of code can change state.

https://github.com/sindresorhus/got/blob/HEAD/documentation/cache.md ```js const storageAdapter = new Map(); await got('https://sindresorhus.com', {cache: storageAdapter}); ``` Maybe something like this ```js const fetch2 = undici.sudoCreateFetch({ // all super user options, outside whatwg fetch cache:...