Skip to content
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

How to run rollup in deno? #4310

Closed
jespertheend opened this issue Dec 21, 2021 · 2 comments · Fixed by #4311
Closed

How to run rollup in deno? #4310

jespertheend opened this issue Dec 21, 2021 · 2 comments · Fixed by #4311

Comments

@jespertheend
Copy link
Contributor

This is a response to #2781 but the issue is locked so I can't comment there.
I keep coming to that issue for an answer every time I need this. Hopefully this helps someone.

You can use esm.sh to run rollup in deno:

import {rollup} from "https://esm.sh/rollup@2.61.1";

const bundle = await rollup({ //...

Alternatively you can install rollup from npm and use the node compatibility layer:

import {createRequire} from "https://deno.land/std@0.110.0/node/module.ts";
const require = createRequire(import.meta.url);
const {rollup} = require("rollup");

const bundle = await rollup({ //...
@shellscape
Copy link
Contributor

Please consider a Pull Request to the docs rather than an issue in the future.

jespertheend added a commit to jespertheend/rollup that referenced this issue Dec 21, 2021
@jespertheend
Copy link
Contributor Author

Ah sorry about that, I was hoping #2781 would automatically create a link back to this issue.
I have created #4311

lukastaegert added a commit that referenced this issue Dec 23, 2021
* Add Deno instructions to docs

Fixes #4310

* Fix typo

* Format

Co-authored-by: Lukas Taegert-Atkinson <lukastaegert@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants