Skip to content

Commit b95e605

Browse files
committed
Drop support for subdirectory imports
1 parent ded29bb commit b95e605

File tree

5 files changed

+10
-54
lines changed

5 files changed

+10
-54
lines changed

examples/react-18/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// import 'react-app-polyfill/stable';
22
import React, { FC } from 'react';
33
import { createRoot } from 'react-dom/client';
4-
import { svgRot90L } from '@cubux/react-utils';
5-
import { SvgFC, svgRot90R } from '@cubux/react-utils/svg';
4+
import { SvgFC, svgRot90L, svgRot90R } from '@cubux/react-utils';
65

76
const SvgIcon: SvgFC = (props) => (
87
<svg

examples/ts-3.9/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// import 'react-app-polyfill/stable';
22
import React, { FC } from 'react';
33
import { render } from 'react-dom';
4-
import { svgRot90L } from '@cubux/react-utils';
5-
import { SvgFC, svgRot90R } from '@cubux/react-utils/svg';
4+
import { SvgFC, svgRot90L, svgRot90R } from '@cubux/react-utils';
65

76
const SvgIcon: SvgFC = (props) => (
87
<svg

examples/ts-4.1/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// import 'react-app-polyfill/stable';
22
import React, { FC } from 'react';
33
import { render } from 'react-dom';
4-
import { svgRot90L } from '@cubux/react-utils';
5-
import { SvgFC, svgRot90R } from '@cubux/react-utils/svg';
4+
import { SvgFC, svgRot90L, svgRot90R } from '@cubux/react-utils';
65

76
const SvgIcon: SvgFC = (props) => (
87
<svg

examples/ts-4.7/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// import 'react-app-polyfill/stable';
22
import React, { FC } from 'react';
33
import { render } from 'react-dom';
4-
import { svgRot90L } from '@cubux/react-utils';
5-
import { SvgFC, svgRot90R } from '@cubux/react-utils/svg';
4+
import { SvgFC, svgRot90L, svgRot90R } from '@cubux/react-utils';
65

76
const SvgIcon: SvgFC = (props) => (
87
<svg

package.json

Lines changed: 6 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -18,57 +18,17 @@
1818
".": {
1919
"import": {
2020
"types": "./dist/index.d.ts",
21-
"default": "./dist/index.esm.js"
21+
"default": "./dist/react-utils.esm.js"
2222
},
2323
"require": {
2424
"types": "./dist/index.d.ts",
2525
"default": "./dist/index.js"
2626
}
27-
},
28-
"./dev": {
29-
"import": {
30-
"types": "./dist/dev/index.d.ts",
31-
"default": "./dist/dev/index.esm.js"
32-
},
33-
"require": {
34-
"types": "./dist/dev/index.d.ts",
35-
"default": "./dist/dev/index.js"
36-
}
37-
},
38-
"./is": {
39-
"import": {
40-
"types": "./dist/is/index.d.ts",
41-
"default": "./dist/is/index.esm.js"
42-
},
43-
"require": {
44-
"types": "./dist/is/index.d.ts",
45-
"default": "./dist/is/index.js"
46-
}
47-
},
48-
"./svg": {
49-
"import": {
50-
"types": "./dist/svg/index.d.ts",
51-
"default": "./dist/svg/index.esm.js"
52-
},
53-
"require": {
54-
"types": "./dist/svg/index.d.ts",
55-
"default": "./dist/svg/index.js"
56-
}
5727
}
5828
},
5929
"types": "dist/index.d.ts",
60-
"typesVersions": {
61-
"*": {
62-
"dev": [
63-
"dist/dev/index.d.ts"
64-
],
65-
"svg": [
66-
"dist/svg/index.d.ts"
67-
]
68-
}
69-
},
7030
"main": "dist/index.js",
71-
"module": "dist/index.esm.js",
31+
"module": "dist/react-utils.esm.js",
7232
"files": [
7333
"dist",
7434
"CHANGELOG.md",
@@ -79,8 +39,8 @@
7939
"node": ">=14"
8040
},
8141
"scripts": {
82-
"build": "dts build --entry src/index.ts --entry 'src/*/index.ts'",
83-
"start": "dts watch --entry src/index.ts --entry 'src/*/index.ts'",
42+
"build": "dts build",
43+
"start": "dts watch",
8444
"prepare": "npm run build",
8545
"test": "tsc --noEmit && dts test",
8646
"test:watch": "npm test -- --watch",
@@ -143,11 +103,11 @@
143103
},
144104
"size-limit": [
145105
{
146-
"path": "dist/index.cjs.production.min.js",
106+
"path": "dist/react-utils.cjs.production.min.js",
147107
"limit": "10 KB"
148108
},
149109
{
150-
"path": "dist/index.esm.js",
110+
"path": "dist/react-utils.esm.js",
151111
"limit": "10 KB"
152112
}
153113
]

0 commit comments

Comments
 (0)