Skip to content

Commit 809f6d3

Browse files
committed
feat: package type module
now package is ESM only BREAKING CHANGE: no commonjs support
1 parent 7f3ec96 commit 809f6d3

10 files changed

+282
-294
lines changed

Diff for: package.json

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "react-chartjs-2",
3+
"type": "module",
34
"version": "4.3.1",
45
"description": "React components for Chart.js",
56
"author": "Jeremy Ayerst",
@@ -22,7 +23,7 @@
2223
],
2324
"sideEffects": false,
2425
"types": "./dist/index.d.ts",
25-
"main": "./src/index.tsx",
26+
"main": "./src/index.ts",
2627
"publishConfig": {
2728
"main": "./dist/index.cjs",
2829
"module": "./dist/index.js",
@@ -35,7 +36,7 @@
3536
"prepublishOnly": "pnpm test && pnpm build && del ./package && clean-publish",
3637
"postpublish": "del ./package",
3738
"emitDeclarations": "tsc --emitDeclarationOnly",
38-
"build": "rollup -c & pnpm emitDeclarations",
39+
"build": "rollup -c && pnpm emitDeclarations",
3940
"start:storybook": "start-storybook -p 6006 --ci",
4041
"build:storybook": "del ./storybook-static; NODE_ENV=production build-storybook",
4142
"test:lint": "eslint \"src/**/*.{ts,tsx}\" \"stories/**/*.{ts,tsx}\" \"sandboxes/**/*.{ts,tsx}\" \"test/**/*.{ts,tsx}\"",
@@ -60,14 +61,14 @@
6061
"@commitlint/cli": "^17.0.0",
6162
"@commitlint/config-conventional": "^17.0.0",
6263
"@commitlint/cz-commitlint": "^17.0.0",
63-
"@rollup/plugin-node-resolve": "^13.0.5",
64+
"@rollup/plugin-node-resolve": "^15.0.1",
6465
"@size-limit/preset-big-lib": "^8.0.0",
6566
"@storybook/addon-actions": "^6.3.12",
6667
"@storybook/addon-controls": "^6.3.12",
6768
"@storybook/addon-docs": "^6.3.12",
6869
"@storybook/addons": "^6.3.12",
6970
"@storybook/react": "^6.3.12",
70-
"@swc/core": "^1.2.95",
71+
"@swc/core": "^1.3.17",
7172
"@swc/helpers": "^0.4.0",
7273
"@testing-library/jest-dom": "^5.5.0",
7374
"@testing-library/react": "^13.0.0",
@@ -105,14 +106,14 @@
105106
"react": "^18.0.0",
106107
"react-dom": "^18.0.0",
107108
"react-test-renderer": "^18.0.0",
108-
"rollup": "^2.58.0",
109-
"rollup-plugin-swc": "^0.2.0",
109+
"rollup": "^3.3.0",
110+
"rollup-plugin-swc3": "^0.7.0",
110111
"simple-git-hooks": "^2.6.1",
111112
"simple-github-release": "^1.0.0",
112113
"size-limit": "^8.0.0",
113114
"standard-version": "^9.3.1",
114115
"tsd": "^0.24.0",
115-
"typescript": "^4.4.3",
116+
"typescript": "^4.9.3",
116117
"vite": "^3.2.4",
117118
"vitest": "^0.25.2",
118119
"vitest-canvas-mock": "^0.2.1",

0 commit comments

Comments
 (0)