Closed tomleadbettermsm closed 6 years ago
Changelog is clear about using named export. https://github.com/TrySound/rollup-plugin-uglify/releases/tag/v4.0.0
@TrySound Please elaborate why uglify-es is no longer supported. I can't see any deprecations in uglify-es itself.
Or you can change this line in the index file ('.\node_modules\rollup-plugin-uglify\index.js')
from
exports.uglify = uglify;
to
exports.default = uglify;
to keep
...
plugins: [
uglify()
]
...
@ardivali I'm not gonna change the api. I think it's right. Use this
const { uglify } = require('rollup-plugin-uglify')
or this
import { uglify } from 'rollup-plugin-uglify'
Otherwise you need to do this ugly this
const { default: uglify } = require('rollup-plugin-uglify');
const uglify = require('rollup-plugin-uglify').default;
Hi. Using the following gives an error in the cli: TypeError: uglify is not a function
This fixes the issue though:
uglify.uglify()
Not sure if I've done something wrong or if there is a defect with the version I'm using ("version": "4.0.0").
Thanks