diff --git a/demo/package.json b/demo/package.json index 34156e2cf..49a43c1fa 100644 --- a/demo/package.json +++ b/demo/package.json @@ -11,7 +11,7 @@ "build:all:chrome-mv2": "wxt build --mv2", "build:all:firefox-mv3": "wxt build -b firefox --mv3", "build:all:firefox-mv2": "wxt build -b firefox", - "prepare": "pnpm -w build && wxt prepare" + "postinstall": "pnpm -w build && wxt prepare" }, "dependencies": { "webextension-polyfill": "^0.10.0" diff --git a/docs/get-started/installation.md b/docs/get-started/installation.md index 9bb472e56..85b7765b7 100644 --- a/docs/get-started/installation.md +++ b/docs/get-started/installation.md @@ -92,7 +92,8 @@ Finally, add scripts to your `package.json`: "dev": "wxt", // [!code ++] "dev:firefox": "wxt --browser firefox", // [!code ++] "build": "wxt build", // [!code ++] - "build:firefox": "wxt build --browser firefox" // [!code ++] + "build:firefox": "wxt build --browser firefox", // [!code ++] + "postinstall": "wxt prepare" // [!code ++] } } ``` diff --git a/templates/react/package.json b/templates/react/package.json index 5641057e6..bceddb08e 100644 --- a/templates/react/package.json +++ b/templates/react/package.json @@ -10,7 +10,7 @@ "build": "wxt build", "build:firefox": "wxt build -b firefox", "compile": "tsc --noEmit", - "prepare": "wxt prepare" + "postinstall": "wxt prepare" }, "dependencies": { "react": "^18.2.0", diff --git a/templates/svelte/package.json b/templates/svelte/package.json index 7c3ab9666..ccfc54ce7 100644 --- a/templates/svelte/package.json +++ b/templates/svelte/package.json @@ -9,7 +9,7 @@ "build": "wxt build", "build:firefox": "wxt build -b firefox", "check": "svelte-check --tsconfig ./tsconfig.json", - "prepare": "wxt prepare" + "postinstall": "wxt prepare" }, "devDependencies": { "@sveltejs/vite-plugin-svelte": "^2.4.2", diff --git a/templates/vanilla/package.json b/templates/vanilla/package.json index d28222ce9..acd31a775 100644 --- a/templates/vanilla/package.json +++ b/templates/vanilla/package.json @@ -10,7 +10,7 @@ "build": "wxt build", "build:firefox": "wxt build -b firefox", "compile": "tsc --noEmit", - "prepare": "wxt prepare" + "postinstall": "wxt prepare" }, "devDependencies": { "typescript": "^5.1.6", diff --git a/templates/vue/package.json b/templates/vue/package.json index 69cc4d3b9..ddb41aee1 100644 --- a/templates/vue/package.json +++ b/templates/vue/package.json @@ -10,7 +10,7 @@ "build": "wxt build", "build:firefox": "wxt build -b firefox", "compile": "vue-tsc --noEmit", - "prepare": "wxt prepare" + "postinstall": "wxt prepare" }, "dependencies": { "vue": "^3.3.4"