diff --git a/package.json b/package.json index e31afd5..a7c5e5b 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "dev": "npm run dev -w example", "test": "playwright test", "build": "rimraf dist && concurrently \"npm run build:js\" \"npm run build:css\" \"npm run build:types\" && node scripts/copy.js", - "build:js": "rollup -c rollup.config.js", + "build:js": "rollup -c rollup.config.cjs --bundleConfigAsCjs", "build:css": "postcss src/*.css --dir dist --ext .min.css", "build:types": "tsc -p tsconfig.json --emitDeclarationOnly --declaration --declarationDir dist/types", "lint": "eslint --ext .ts ./src", diff --git a/rollup.config.js b/rollup.config.cjs similarity index 67% rename from rollup.config.js rename to rollup.config.cjs index ae36693..79fffea 100644 --- a/rollup.config.js +++ b/rollup.config.cjs @@ -1,6 +1,6 @@ -import { defineConfig } from "rollup"; -import typescript from "@rollup/plugin-typescript"; -import terser from "@rollup/plugin-terser"; +const { defineConfig } = require("rollup"); +const typescript = require("@rollup/plugin-typescript"); +const terser = require("@rollup/plugin-terser"); import pkg from "./package.json" with { type: "json" };