-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there just a list of the overrides in case we are hit with out of memory issues? #85
Comments
I made a lightweight CLI1 with performance in mind that integrating meta data of nolyfill as one of presets. Basically it streaming lockfile line-by-line by doing plain filtering on package names and nothing more. Still in earlier stage, feedback is welcome. Footnotes |
Stream parsing is almost impossible for YAML format (which is the format of |
Yes, support all kinds of lockfiles would be an epic effort, thus I'd shortcut by calling |
const headers = { 'Content-Type': 'text/html' };
const html = `
<!doctype html>
<head>
<script type="importmap">
{
"imports": {
"pkg-fence/": "https://esm.sh/jsr/@imcotton/[email protected]/"
}
}
</script>
<script type="module">
import { nolyfill } from 'pkg-fence/presets';
console.log(nolyfill.list.length);
console.log(nolyfill.list.slice(0, 5));
console.log(nolyfill.check('hasown'));
</script>
</head>
<body>
<p>hello, JSR via esm.sh</p>
</body>
`;
export default {
fetch () {
return new Response(html, { headers });
},
}; For sake of demonstration, save above code snippet as
|
I can't use the CLI, because even with 32G of max-old-space-size, I get the OOM error, reported here: #33
We don't need a CLI -- we can copy-paste a list of overrides -- any packages we don't actually use would no-op.
The text was updated successfully, but these errors were encountered: