Skip to content

Commit e798def

Browse files
authored
Use ESM config file for Rollup (#10564)
1 parent b19fc01 commit e798def

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Diff for: rollup.config.cjs renamed to rollup.config.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
const cleanup = require('rollup-plugin-cleanup');
2-
const json = require('@rollup/plugin-json');
3-
const resolve = require('@rollup/plugin-node-resolve').default;
4-
const terser = require('rollup-plugin-terser').terser;
5-
const pkg = require('./package.json');
1+
import cleanup from 'rollup-plugin-cleanup';
2+
import json from '@rollup/plugin-json';
3+
import resolve from '@rollup/plugin-node-resolve';
4+
import {terser} from 'rollup-plugin-terser';
5+
import {version, homepage} from './package.json';
66

77
const banner = `/*!
8-
* Chart.js v${pkg.version}
9-
* ${pkg.homepage}
8+
* Chart.js v${version}
9+
* ${homepage}
1010
* (c) ${(new Date(process.env.SOURCE_DATE_EPOCH ? (process.env.SOURCE_DATE_EPOCH * 1000) : new Date().getTime())).getFullYear()} Chart.js Contributors
1111
* Released under the MIT License
1212
*/`;
1313

14-
module.exports = [
14+
export default [
1515
// UMD build
1616
// dist/chart.umd.js
1717
{

0 commit comments

Comments
 (0)