Skip to content

Commit 0d19692

Browse files
fix: 🔧 move from esm (mjs) to legacy js (#541)
1 parent 849e00f commit 0d19692

File tree

3 files changed

+151
-164
lines changed

3 files changed

+151
-164
lines changed

package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
"license": "MIT",
77
"repository": "https://github.com/hc-oss/react-multi-select-component",
88
"main": "./dist/index.js",
9-
"module": "./dist/index.mjs",
9+
"module": "./dist/esm/index.js",
1010
"types": "./dist/index.d.ts",
1111
"scripts": {
12-
"build": "tsup src/index.tsx --inject-style --minify --format esm,cjs --dts --external react",
13-
"dev": "tsup src/index.tsx --inject-style --format esm,cjs --watch --dts --external react",
12+
"build": "tsup src/index.tsx --inject-style --legacy-output --minify --format esm,cjs --dts --external react",
13+
"dev": "tsup src/index.tsx --inject-style --legacy-output --format esm,cjs --watch --dts --external react",
1414
"lint": "eslint src --fix",
1515
"size": "size-limit",
1616
"storybook": "start-storybook -p 6006",
@@ -28,11 +28,11 @@
2828
"@storybook/addon-knobs": "^6.4.0",
2929
"@storybook/addon-links": "^6.4.14",
3030
"@storybook/react": "^6.4.14",
31-
"@types/react": "^17.0.13",
32-
"@types/react-dom": "^17.0.8",
33-
"@typescript-eslint/eslint-plugin": "^5.10.0",
34-
"@typescript-eslint/parser": "^5.10.0",
35-
"eslint": "7.32.0",
31+
"@types/react": "^17.0.38",
32+
"@types/react-dom": "^17.0.11",
33+
"@typescript-eslint/eslint-plugin": "^5.10.1",
34+
"@typescript-eslint/parser": "^5.10.1",
35+
"eslint": "8.7.0",
3636
"eslint-plugin-prettier": "^4.0.0",
3737
"eslint-plugin-react": "^7.28.0",
3838
"eslint-plugin-simple-import-sort": "^7.0.0",
@@ -43,8 +43,8 @@
4343
"react-dom": "^17.0.2",
4444
"size-limit": "^7.0.5",
4545
"storybook-addon-turbo-build": "^1.0.1",
46-
"tsup": "^5.10.1",
47-
"typescript": "^4.5.3"
46+
"tsup": "^5.11.11",
47+
"typescript": "^4.5.5"
4848
},
4949
"browserslist": [
5050
"defaults",

src/multi-select/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import "../style.css";
22

3-
import * as React from "react";
3+
import React from "react";
44

55
import { MultiSelectProvider } from "../hooks/use-multi-select";
66
import { ISelectProps } from "../lib/interfaces";

0 commit comments

Comments
 (0)