diff --git a/.netlify/netlify-plugin-pnpm/index.js b/.netlify/netlify-plugin-pnpm/index.js new file mode 100644 index 000000000000..90717145d6fd --- /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") + } catch (error) { + return build.failBuild(error) + } + } +} diff --git a/.netlify/netlify-plugin-pnpm/manifest.yml b/.netlify/netlify-plugin-pnpm/manifest.yml new file mode 100644 index 000000000000..40042b0c2a96 --- /dev/null +++ b/.netlify/netlify-plugin-pnpm/manifest.yml @@ -0,0 +1,2 @@ +name: netlify-plugin-pnpm +inputs: [] diff --git a/.prettierignore b/.prettierignore index c1d6aeb5abb7..631322664cc3 100644 --- a/.prettierignore +++ b/.prettierignore @@ -23,3 +23,4 @@ docker-examples/ build/ .vscode/ .github/ +.netlify/ diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 000000000000..8ed4f77ed0b5 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,7 @@ + +[build] + command = "pnpm run build" + publish = "dist" + +[[plugins]] + package = "/.netlify/netlify-plugin-pnpm"