Core: Fix the exports setup to make bundlers work with ESM & CommonJS
[jquery.git] / test / bundler_smoke_tests / rollup-commonjs.config.js
blob3060d239678242c7855a48dfaf07ef512f5e1e41
1 import path from "node:path";
2 import { fileURLToPath } from "node:url";
3 import resolve from "@rollup/plugin-node-resolve";
4 import commonjs from "@rollup/plugin-commonjs";
6 const dirname = path.dirname( fileURLToPath( import.meta.url ) );
8 export default {
9         input: `${ dirname }/src-esm-commonjs/main.js`,
10         output: {
11                 dir: `${ dirname }/tmp/rollup-commonjs`,
12                 format: "iife",
13                 sourcemap: true
14         },
15         plugins: [
16                 resolve(),
17                 commonjs()
18         ]