bundle-collapser icon indicating copy to clipboard operation
bundle-collapser copied to clipboard

From CommonJS to ES!?

Open blaasvaer opened this issue 9 months ago • 0 comments

How do I convert

const collapse = require('bundle-collapser/plugin');

to

import collapse from 'bundle-collapser/plugin';

I've tried this (along a trillion other wild guesses)

import { plugin as collapse } from 'bundle-collapser';

import * as collapse from 'bundle-collapser';

import * as collapse from 'bundle-collapser/plugin';

import { plugin as collapse } from 'bundle-collapser/plugin';

But Gulp keeps crashing …

blaasvaer avatar Feb 26 '25 13:02 blaasvaer