@weavy/uikit-react 19.0.5 → 19.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,15 +1,30 @@
1
1
  {
2
2
  "name": "@weavy/uikit-react",
3
- "version": "19.0.5",
3
+ "version": "19.1.0",
4
4
  "author": "Weavy",
5
5
  "description": "React UI-kit for Weavy",
6
6
  "homepage": "https://github.com/weavy/weavy-uikit-react",
7
7
  "license": "MIT",
8
- "main": "dist/cjs/index.js",
9
- "module": "dist/esm/index.js",
8
+ "main": "dist/cjs/index.es5.js",
9
+ "module": "dist/esm/index.es5.js",
10
10
  "types": "dist/index.d.ts",
11
- "style": "dist/css/weavy-react.css",
11
+ "style": "dist/css/weavy.css",
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/esm/index.js",
15
+ "require": "./dist/cjs/index.js",
16
+ "types": "./dist/index.d.ts",
17
+ "style": "./dist/css/weavy.css"
18
+ },
19
+ "./dist/css/": {
20
+ "default": "./dist/css/"
21
+ }
22
+ },
12
23
  "devDependencies": {
24
+ "@babel/core": "^7.23.7",
25
+ "@babel/preset-env": "^7.23.7",
26
+ "@babel/preset-react": "^7.23.3",
27
+ "@rollup/plugin-babel": "^6.0.4",
13
28
  "@rollup/plugin-commonjs": "^25.0.7",
14
29
  "@rollup/plugin-node-resolve": "^15.2.3",
15
30
  "@rollup/plugin-terser": "^0.4.4",
package/rollup.config.mjs CHANGED
@@ -3,48 +3,74 @@ import commonjs from "@rollup/plugin-commonjs";
3
3
  import typescript from "@rollup/plugin-typescript";
4
4
  import dts from "rollup-plugin-dts";
5
5
  import terser from "@rollup/plugin-terser";
6
- import peerDepsExternal from 'rollup-plugin-peer-deps-external';
6
+ import peerDepsExternal from "rollup-plugin-peer-deps-external";
7
+ import { getBabelOutputPlugin } from "@rollup/plugin-babel";
7
8
 
8
9
  //import packageJson from `./package.json` assert { type: `json` };
9
10
 
10
11
  //const packageJson = require("./package.json");
11
12
  const { default: packageJson } = await import("./package.json", {
12
- assert: {
13
- type: "json",
14
- },
15
- });
13
+ assert: {
14
+ type: "json",
15
+ },
16
+ });
16
17
 
17
18
  export default [
18
- {
19
- input: "src/index.ts",
20
- output: [
21
- {
22
- file: packageJson.main,
23
- format: "cjs",
24
- sourcemap: true,
25
- },
26
- {
27
- file: packageJson.module,
28
- format: "esm",
29
- sourcemap: true,
30
- },
19
+ {
20
+ input: "src/index.ts",
21
+ output: [
22
+ {
23
+ file: packageJson.main,
24
+ format: "cjs",
25
+ sourcemap: true,
26
+ plugins: [
27
+ getBabelOutputPlugin({
28
+ presets: ["@babel/preset-env", "@babel/preset-react"],
29
+ minified: true,
30
+ comments: false,
31
+ }),
31
32
  ],
33
+ },
34
+ {
35
+ file: packageJson.exports["."].require,
36
+ format: "cjs",
37
+ sourcemap: true,
38
+ plugins: [terser()],
39
+ },
40
+ {
41
+ file: packageJson.module,
42
+ format: "esm",
43
+ sourcemap: true,
32
44
  plugins: [
33
- peerDepsExternal(),
34
- resolve({
35
- browser: true
36
- }),
37
- commonjs(),
38
- typescript({ tsconfig: "./tsconfig.json" }),
39
- terser(),
45
+ getBabelOutputPlugin({
46
+ presets: ["@babel/preset-env", "@babel/preset-react"],
47
+ minified: true,
48
+ comments: false,
49
+ }),
40
50
  ],
41
- external: ["react", "react-dom"],
42
- strictDeprecations: false,
43
- },
44
- {
45
- input: "dist/esm/types/index.d.ts",
46
- output: [{ file: "dist/index.d.ts", format: "esm" }],
47
- plugins: [dts()],
48
- strictDeprecations: false,
49
- },
50
- ];
51
+ },
52
+ {
53
+ file: packageJson.exports["."].import,
54
+ format: "esm",
55
+ sourcemap: true,
56
+ plugins: [terser()],
57
+ },
58
+ ],
59
+ plugins: [
60
+ peerDepsExternal(),
61
+ resolve({
62
+ browser: true,
63
+ }),
64
+ commonjs(),
65
+ typescript({ tsconfig: "./tsconfig.json" }),
66
+ ],
67
+ external: ["react", "react-dom"],
68
+ strictDeprecations: false,
69
+ },
70
+ {
71
+ input: "dist/esm/types/index.d.ts",
72
+ output: [{ file: "dist/index.d.ts", format: "esm" }],
73
+ plugins: [dts()],
74
+ strictDeprecations: false,
75
+ },
76
+ ];