diff --git a/.netlify/netlify-plugin-pnpm/index.js b/.netlify/netlify-plugin-pnpm/index.js new file mode 100644 index 0000000..38b62c5 --- /dev/null +++ b/.netlify/netlify-plugin-pnpm/index.js @@ -0,0 +1,10 @@ +module.exports = { + onPreBuild: async ({ utils: { build, run } }) => { + try { + await run.command("npm install -g pnpm") + await run.command("pnpm install --frozen-lockfile=false") + } catch (error) { + return build.failBuild(error) + } + } +} \ No newline at end of file diff --git a/.netlify/netlify-plugin-pnpm/manifest.yml b/.netlify/netlify-plugin-pnpm/manifest.yml new file mode 100644 index 0000000..afed29f --- /dev/null +++ b/.netlify/netlify-plugin-pnpm/manifest.yml @@ -0,0 +1,2 @@ +name: netlify-plugin-pnpm +inputs: [] \ No newline at end of file diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000..5e84180 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,8 @@ +[build] + command = "npm run build" + +[build.environment] + NPM_FLAGS="--prefix=/dev/null" + +[[plugins]] + package = "/.netlify/netlify-plugin-pnpm" \ No newline at end of file diff --git a/package.json b/package.json index 6c2bcd6..2fef811 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,6 @@ "private": true, "license": "MIT", "scripts": { - "prebuild": "test \"$CI\" = true && npx pnpm install -r --store=node_modules/.pnpm-store || echo skipping pnpm install", "dev": "astro dev", "start": "astro dev", "build": "astro build",