Allow excluding based on chunk name #74
Comments
I wanted to drop include/exclude support anyway. But if there is a use case I would accept a PR with breaking change. |
I'm dropping include/exclude support in upcoming major release. You are free to add new behaviour. |
What's the migration path like? How do we exclude going forward? |
@mrchief What's your use case? |
Trying to avoid minifying already minified file. |
I would also like this, in my case I have html coming through as a chunk to be rendered, and I would like to filter it out so the the JS is still minified |
I see this pattern in a lot of plugins import { createFilter } from '@rollup/pluginutils';
const filter = createFilter(include, exclude)
.....
async load(id) {
if (!filter(id)) return null; |
this pattern is getting mangled: class MyElement extends Whatever {
static get is() { return 'my-element'; }
}
customElements.define(MyElement.is, MyElement);
I'd much rather minify that js file myself at an earlier build step, but this otherwise excellent doesn't honour the typical include/exclude options that almost every other rollup plugin has. Please consider putting those options back. |
In my rollup build I have a large prebuilt chunk, which I separate using
manualChunks
. I'd like to be able to exclude this chunk from terser, but unfortunately I can't because terserexclude
option acts on thefileName
property. This is is the hashed named, which I don't know and can't match on.I'd like to propose terser to exclude based on the
name
field, so that you can exclude based on the actual chunk name. See rollup/rollup#3497 for context.The text was updated successfully, but these errors were encountered: