From 3cfaf4bcdb96e95b42df305c248911ca59c03635 Mon Sep 17 00:00:00 2001 From: JohnAlbin Date: Wed, 18 Oct 2023 01:46:37 +0800 Subject: [PATCH] build: remove legacy umd and esm JavaScript builds Fixes #528 --- packages/next-drupal-query/package.json | 9 +++++---- packages/next-drupal/package.json | 11 ++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/next-drupal-query/package.json b/packages/next-drupal-query/package.json index ac6ad73f..a3568ca2 100644 --- a/packages/next-drupal-query/package.json +++ b/packages/next-drupal-query/package.json @@ -4,8 +4,9 @@ "version": "0.4.0", "sideEffects": false, "source": "src/index.ts", - "main": "dist/index.js", - "module": "dist/index.esm.js", + "type": "module", + "main": "dist/index.cjs", + "module": "dist/index.modern.js", "types": "dist/index.d.ts", "license": "MIT", "publishConfig": { @@ -16,8 +17,8 @@ "url": "https://twitter.com/shadcn" }, "scripts": { - "prepare": "microbundle --no-compress --jsx React.createElement", - "dev": "microbundle watch --no-compress --jsx React.createElement", + "prepare": "microbundle --no-compress --jsx React.createElement --format modern,cjs", + "dev": "microbundle watch --no-compress --jsx React.createElement --format modern,cjs", "test": "jest" }, "keywords": [ diff --git a/packages/next-drupal/package.json b/packages/next-drupal/package.json index 61705138..37183d5d 100644 --- a/packages/next-drupal/package.json +++ b/packages/next-drupal/package.json @@ -4,9 +4,10 @@ "version": "1.6.0", "sideEffects": false, "source": "src/index.ts", - "main": "dist/index.js", - "module": "dist/index.esm.js", - "types": "dist/index.d.ts", + "type": "module", + "main": "dist/index.cjs", + "module": "dist/index.modern.js", + "types": "dist/types.d.ts", "license": "MIT", "publishConfig": { "access": "public" @@ -16,8 +17,8 @@ "url": "https://twitter.com/shadcn" }, "scripts": { - "prepare": "microbundle --no-compress --jsx React.createElement", - "dev": "microbundle watch --no-compress --jsx React.createElement", + "prepare": "microbundle --no-compress --jsx React.createElement --format modern,cjs", + "dev": "microbundle watch --no-compress --jsx React.createElement --format modern,cjs", "test": "jest", "prepublishOnly": "yarn prepare" },