An open API service indexing awesome lists of open source software.

https://github.com/truewinter/astro-copy-prod-deps

Astro integration that copies only the dependencies needed in production for SSR and hybrid websites
https://github.com/truewinter/astro-copy-prod-deps

astro-integration withastro

Last synced: 4 months ago
JSON representation

Astro integration that copies only the dependencies needed in production for SSR and hybrid websites

Awesome Lists containing this project

README

          

# astro-copy-prod-deps

`astro-copy-prod-deps` is an Astro integration for use with hybrid and SSR websites that copies only the dependencies needed in production from `node_modules` to the `dist/server` directory.

This is useful if you have a CI server building your website and don't want to run `npm install` on your production web server.

![Image](https://cdn.truewinter.net/i/c6ac19.png)

## Installation

### Automatic

Run `npx astro add astro-copy-prod-deps` to install the integration.

### Manual

Modify your `astro.config.mjs` file as follows:

```js
import copyProdDeps from `astro-copy-prod-deps`;

export default defineConfig({
integrations: [copyProdDeps()]
});
```