From: 
Subject: Debian changes

The Debian packaging of node-cropperjs is maintained in git, using a workflow
similar to the one described in dgit-maint-merge(7).
The Debian delta is represented by this one combined patch; there isn't a
patch queue that can be represented as a quilt series.

A detailed breakdown of the changes is available from their canonical
representation -- git commits in the packaging repository.
For example, to see the changes made by the Debian maintainer in the first
upload of upstream version 1.2.3, you could use:

    % git clone https://git.dgit.debian.org/node-cropperjs
    % cd node-cropperjs
    % git log --oneline 1.2.3..debian/1.2.3-1 -- . ':!debian'

(If you have dgit, use `dgit clone node-cropperjs`, rather than plain `git clone`.)

We don't use debian/source/options single-debian-patch because it has bugs.
Therefore, NMUs etc. may nevertheless have made additional patches.

---

diff --git a/packages/cropperjs/package.json b/packages/cropperjs/package.json
index 0cee37d..49aba59 100644
--- a/packages/cropperjs/package.json
+++ b/packages/cropperjs/package.json
@@ -5,8 +5,8 @@
   "main": "dist/cropper.raw.js",
   "module": "dist/cropper.esm.raw.js",
   "types": "dist/cropper.d.ts",
-  "unpkg": "dist/cropper.js",
-  "jsdelivr": "dist/cropper.js",
+  "unpkg": "dist/cropper.raw.js",
+  "jsdelivr": "dist/cropper.raw.js",
   "files": [
     "dist"
   ],
@@ -23,11 +23,7 @@
       },
       "require": {
         "types": "./dist/cropper.d.ts",
-        "node": {
-          "production": "./dist/cropper.min.js",
-          "development": "./dist/cropper.js",
-          "default": "./dist/cropper.raw.js"
-        },
+        "node": "./dist/cropper.raw.js",
         "default": "./dist/cropper.raw.js"
       }
     },
diff --git a/rollup.config.js b/rollup.config.js
index c1f99f9..8f79f4e 100644
--- a/rollup.config.js
+++ b/rollup.config.js
@@ -1,25 +1,38 @@
 import fs from 'fs';
-import changeCase from 'change-case';
-import createBanner from 'create-banner';
-import commonjs from '@rollup/plugin-commonjs';
-import nodeResolve from '@rollup/plugin-node-resolve';
-import postcss from 'rollup-plugin-inline-postcss';
-import replace from '@rollup/plugin-replace';
-import terser from '@rollup/plugin-terser';
-import typescript from '@rollup/plugin-typescript';
-import config from './tsconfig.json';
+import { createRequire } from 'module';
 
+const require = createRequire(import.meta.url);
+const commonjs = require('@rollup/plugin-commonjs');
+const { nodeResolve } = require('@rollup/plugin-node-resolve');
+const replace = require('@rollup/plugin-replace');
+const terser = require('@rollup/plugin-terser');
+const typescript = require('@rollup/plugin-typescript');
+const config = require('./tsconfig.json');
 const pkg = JSON.parse(fs.readFileSync(`${process.cwd()}/package.json`));
+const compilerOptions = {
+  ...config.compilerOptions,
+  types: [],
+};
+const typescriptOptions = {
+  compilerOptions,
+  exclude: ['**/tests/**'],
+  include: ['src/**/*'],
+};
 const isCropperJS = pkg.name === 'cropperjs';
-const normalizeGlobalName = (name) => changeCase.pascalCase(name.replace(/[a-z]+-/, ''));
+const pascalCase = (value) => value
+  .split(/[^A-Za-z0-9]+/)
+  .filter(Boolean)
+  .map((part) => `${part.charAt(0).toUpperCase()}${part.slice(1)}`)
+  .join('');
+const normalizeGlobalName = (name) => pascalCase(name.replace(/[a-z]+-/, ''));
 const name = isCropperJS ? 'Cropper' : normalizeGlobalName(pkg.name);
-const banner = createBanner({
-  data: {
-    name: isCropperJS ? 'Cropper.js' : name,
-    year: '2015-present',
-  },
-  template: 'inline',
-});
+const banner = `/*!
+ * ${isCropperJS ? 'Cropper.js' : name} v${pkg.version}
+ * https://github.com/fengyuanchen/cropperjs
+ *
+ * Copyright 2015-present Chen Fengyuan
+ * Released under the MIT license
+ */`;
 const bundles = ['unbundled', 'bundled'];
 const formats = ['esm', 'umd'];
 const modes = ['development', 'production'];
@@ -44,7 +57,9 @@ export default bundles.reduce((configs, bundle) => {
           format,
           name: isESM ? undefined : name,
           banner: isCropperJS ? banner : undefined,
+          exports: isESM ? undefined : 'named',
           globals: isBundled ? undefined : globals,
+          interop: isBundled ? undefined : 'auto',
           file: (isESM ? pkg.module : pkg.main)
             .replace('.raw', isBundled ? '' : '.raw')
             .replace('.js', `${isProduction ? '.min' : ''}.js`),
@@ -55,11 +70,7 @@ export default bundles.reduce((configs, bundle) => {
       plugins: [
         nodeResolve(),
         commonjs(),
-        postcss({
-          include: [/\/style\.ts$/],
-          styleRegex: /(?:export default `)([^`]+)(?:`;)/g,
-        }),
-        typescript(config.compilerOptions),
+        typescript(typescriptOptions),
         replace({
           preventAssignment: true,
           __VERSION__: pkg.version,
