diff --git a/package.json b/package.json index 4916225e..7e1f8fa8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "reagraph", - "version": "4.7.8", + "version": "4.7.9", "description": "WebGL Node-based Graph for React", "scripts": { "build": "vite build", @@ -15,16 +15,16 @@ "prepare": "husky install", "chromatic": "npx chromatic --project-token=a7098a56897c --auto-accept-changes" }, + "type": "module", "source": "src/index.ts", - "main": "dist/index.umd.js", - "browser": "dist/index.umd.js", "style": "dist/style.css", - "module": "dist/index.es.js", "types": "dist/index.d.ts", + "main": "./dist/reagraph.umd.cjs", + "module": "./dist/reagraph.js", "exports": { ".": { - "import": "./dist/index.es.js", - "require": "./dist/index.umd.js" + "import": "./dist/reagraph.js", + "require": "./dist/reagraph.umd.cjs" }, "./dist/style.css": "./dist/style.css" }, diff --git a/postcss.config.js b/postcss.config.cjs similarity index 54% rename from postcss.config.js rename to postcss.config.cjs index 8448aa7c..9dd6fb68 100644 --- a/postcss.config.js +++ b/postcss.config.cjs @@ -1,3 +1,6 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +/* eslint-disable no-undef */ +// eslint-disable-next-line no-undef module.exports = { plugins: [ require('postcss-nested'), diff --git a/vite.config.ts b/vite.config.ts index 1412332e..9734f484 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -32,8 +32,7 @@ export default defineConfig({ lib: { entry: resolve('src', 'index.ts'), name: 'reagraph', - fileName: format => `index.${format}.js`, - formats: ['es', 'umd'] + fileName: 'reagraph' }, rollupOptions: { plugins: [