Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Rollup 3.0.0 #119

Open
lucien-perouze opened this issue Oct 11, 2022 · 13 comments
Open

Rollup 3.0.0 #119

lucien-perouze opened this issue Oct 11, 2022 · 13 comments

Comments

@lucien-perouze
Copy link

This plugin isn't compatible with Rollup 3.0.0.

Do you intend on updating it ?

Thanks.

@rexkenley
Copy link

Same here, but with Rollup 3.1.0

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/rollup
npm ERR! dev rollup@"^3.1.0" from the root project
npm ERR! peerOptional rollup@"^1.20.0||^2.0.0||^3.0.0" from @rollup/[email protected]
npm ERR! node_modules/@rollup/plugin-image
npm ERR! dev @rollup/plugin-image@"^3.0.0" from the root project
npm ERR! 4 more (@rollup/plugin-node-resolve, rollup-plugin-cleaner, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer rollup@"^2.0.0" from [email protected]
npm ERR! node_modules/rollup-plugin-terser
npm ERR! dev rollup-plugin-terser@"^7.0.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/rollup
npm ERR! peer rollup@"^2.0.0" from [email protected]
npm ERR! node_modules/rollup-plugin-terser
npm ERR! dev rollup-plugin-terser@"^7.0.2" from the root project

@UmamiAppearance
Copy link

UmamiAppearance commented Oct 18, 2022

Use:

npm i rollup-plugin-minification -D

as a replacement.

rollup config:

//import { terser } from "rollup-plugin-terser";
import { terser } from "rollup-plugin-minification";
While waiting for the upgrade I was stuck with a development which depends on this plugin. I decided to hack together a workaround until this is up to date.
  1. Install vanilla terser and rollup-plugin-your-function :
npm i terser -D
npm i rollup-plugin-your-function -D
  1. Adjust the rollup config:
//import { terser } from "rollup-plugin-terser";
import { minify } from "terser";
import { yourFunction } from "rollup-plugin-your-function";

const terser = () => yourFunction({
    output: true,
    name: "terser",
    fn: async (source, options) => minify(
        source,
        {
            module: (/^esm?$/).test(options.outputOptions.format),
            toplevel: options.outputOptions.format === "cjs",
            sourceMap: true
        }
    )
});

Maybe this is useful for anyone else besides me.

@Victor2333
Copy link

While waiting for the upgrade I was stuck with a development which depends on this plugin. I decided to hack together a workaround until this is up to date.

  1. Install vanilla terser and rollup-plugin-your-function :
npm i terser -D
npm i rollup-plugin-your-function -D
  1. Adjust the rollup config:
//import { terser } from "rollup-plugin-terser";
import { minify } from "terser";
import { yourFunction } from "rollup-plugin-your-function";

const terser = () => yourFunction({
    output: true,
    name: "terser",
    fn: async (source, options) => minify(
        source,
        {
            module: (/^esm?$/).test(options.outputOptions.format),
            toplevel: options.outputOptions.format === "cjs",
            sourceMap: true
        }
    )
});

Maybe this is useful for anyone else besides me.

Thanks!

@UmamiAppearance
Copy link

I don't think, that there will be much progress here at the moment. So, I decided to step in for a replacement. If have created rollup-plugin-minification, which you can use as a 1:1 replacement. Right now it is just the packed code I mentioned above .

@lucien-perouze
Copy link
Author

I don't think, that there will be much progress here at the moment. So, I decided to step in for a replacement. If have created rollup-plugin-minification, which you can use as a 1:1 replacement. Right now it is just the packed code I mentioned above .

Wow ! The real captain ! 💯 Thank you for your time.

@UmamiAppearance
Copy link

Wow ! The real captain

Ahoy! ⚓😁

See you on the other bank.

@willeastcott
Copy link

Just so everybody is aware, @tada5hi is contributing a Terser plugin to the official repo of Rollup plugins: rollup/plugins#1323

@UmamiAppearance
Copy link

That is good to know.

@limonte
Copy link

limonte commented Oct 27, 2022

The official plugin with Rollup v3 support has been released: https://npmjs.com/package/@rollup/plugin-terser 🎉

@UmamiAppearance
Copy link

That is good news. My replacement repository is now archived. I'll leave the npm package for a while for an easier transition. Cheers everyone.

@limonte
Copy link

limonte commented Oct 28, 2022

That is good news. My replacement repository is now archived. I'll leave the npm package for a while for an easier transition. Cheers everyone.

I'd also recommend npm deprecate rollup-plugin-minification "use @rollup/plugin-terser instead"

@UmamiAppearance
Copy link

True and done.

@aliehyaie
Copy link

rollup-plugin-minification has been obsoleted
use @rollup/plugin-terser
npm i -D @rollup/plugin-terser

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants