diff --git a/.gitignore b/.gitignore index f8d5bc6..c576668 100644 --- a/.gitignore +++ b/.gitignore @@ -130,5 +130,4 @@ dist .pnp.* node_modules/ -packages/*/node_modules/ -packages/*/dist/ \ No newline at end of file +packages/*/node_modules/ \ No newline at end of file diff --git a/.nvmrc b/.nvmrc deleted file mode 100644 index 9aef5aa..0000000 --- a/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -v20.17.0 \ No newline at end of file diff --git a/packages/react-metronome/.gitignore b/packages/react-metronome/.gitignore index 56e8034..331ecfd 100644 --- a/packages/react-metronome/.gitignore +++ b/packages/react-metronome/.gitignore @@ -1,4 +1,3 @@ node_modules -dist .rollup.cache .DS_Store \ No newline at end of file diff --git a/packages/react-metronome/package.json b/packages/react-metronome/package.json index 9ab5348..ecc3d16 100644 --- a/packages/react-metronome/package.json +++ b/packages/react-metronome/package.json @@ -1,12 +1,13 @@ { "name": "brgndy-react-metronome", - "version": "1.1.3", + "version": "1.1.4", "description": "metronome library component for react", "main": "dist/cjs/index.js", + "types": "dist/index.d.ts", + "type": "module", "files": [ "dist" ], - "types": "dist/index.d.ts", "scripts": { "dev": "vite", "rollup": "rollup -c --bundleConfigAsCjs", diff --git a/packages/react-metronome/rollup.config.js b/packages/react-metronome/rollup.config.js index 40bf64e..350ae4f 100644 --- a/packages/react-metronome/rollup.config.js +++ b/packages/react-metronome/rollup.config.js @@ -20,7 +20,6 @@ export default [ ], plugins: [ typescript(), - nodeResolve(), commonjs(), @@ -32,11 +31,12 @@ export default [ limit: 100000, }), ], + external: ['react', 'react-dom'], }, { - input: 'dist/lib/index.d.ts', + input: 'dist/index.d.ts', output: [{ file: 'dist/index.d.ts', format: 'esm' }], plugins: [dts.default()], - external: ['react', 'react-dom'], + external: [/\.css$/], }, ]; diff --git a/packages/react-wave-form/rollup.config.js b/packages/react-wave-form/rollup.config.js index 060c4ae..de27fd7 100644 --- a/packages/react-wave-form/rollup.config.js +++ b/packages/react-wave-form/rollup.config.js @@ -1,21 +1,20 @@ -import nodeResolve from "@rollup/plugin-node-resolve"; -import commonjs from "@rollup/plugin-commonjs"; -import typescript from "@rollup/plugin-typescript"; -import url from "@rollup/plugin-url"; -import dts from "rollup-plugin-dts"; -import terser from "@rollup/plugin-terser"; -import peerDepsExternal from "rollup-plugin-peer-deps-external"; -import css from "rollup-plugin-import-css"; - -const packageJson = require("./package.json"); +import nodeResolve from '@rollup/plugin-node-resolve'; +import commonjs from '@rollup/plugin-commonjs'; +import typescript from '@rollup/plugin-typescript'; +import url from '@rollup/plugin-url'; +import dts from 'rollup-plugin-dts'; +import terser from '@rollup/plugin-terser'; +import peerDepsExternal from 'rollup-plugin-peer-deps-external'; +import css from 'rollup-plugin-import-css'; +import packageJson from './package.json' assert { type: 'json' }; export default [ { - input: "src/index.ts", + input: 'src/index.ts', output: [ { file: packageJson.main, - format: "esm", + format: 'esm', sourcemap: true, }, ], @@ -28,16 +27,16 @@ export default [ terser(), peerDepsExternal(), url({ - fileName: "[name][extname]", - include: ["**/*.wav"], + fileName: '[name][extname]', + include: ['**/*.wav'], limit: 100000, }), ], - external: ["react", "react-dom"], + external: ['react', 'react-dom'], }, { - input: "dist/cjs/types/src/index.d.ts", - output: [{ file: "dist/index.d.ts", format: "esm" }], + input: 'dist/cjs/types/src/index.d.ts', + output: [{ file: 'dist/index.d.ts', format: 'esm' }], plugins: [dts.default()], external: [/\.css$/], },