From 47e840328558cc2652713080c634f75b48933ac2 Mon Sep 17 00:00:00 2001 From: 1aron Date: Mon, 15 Jan 2024 10:58:02 +0800 Subject: [PATCH] Fix(Nuxt): Incorrectly adding `postinstall` script to production --- packages/nuxt/package.json | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index 491f9937f..895214342 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -1,12 +1,11 @@ { "name": "@master/css.nuxt", "scripts": { - "build": "nuxt-module-build build --stub", - "dev": "nuxi dev playground", + "build": "nuxt prepare && nuxt-module-build build --stub", + "dev": "nuxt prepare && nuxi dev playground", "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground", "lint": "eslint .", - "test": "vitest run", - "postinstall": "nuxt prepare" + "test": "nuxt prepare && vitest run" }, "type": "module", "license": "MIT", @@ -34,6 +33,13 @@ "ssr" ], "sideEffects": false, + "exports": { + ".": { + "types": "./dist/types.d.ts", + "import": "./dist/module.mjs", + "require": "./dist/module.cjs" + } + }, "main": "./dist/module.cjs", "types": "./dist/types.d.ts", "files": [