set up local build environment for packaging

This commit is contained in:
andrzej 2024-10-04 10:36:00 +02:00
parent 447504667f
commit 19109b2b35
3 changed files with 11 additions and 2 deletions

View File

@ -1,7 +1,7 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
basePath: "/subman",
// basePath: "/subman",
webpack: (config) => {
config.externals = [...config.externals, "bcrypt"];
return config;

View File

@ -5,7 +5,7 @@
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"build": "next build && ./package.sh",
"start": "next start",
"lint": "next lint",
"tailwind": "npx tailwindcss -i ./src/app/globals.css -o ./src/app/tailwind.css --watch"

9
package.sh Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
mkdir pack
cp -r public pack/
cp -r prisma pack/
cp - r .next/standalone/** pack/
cp -r .next/static pack/.next/
tar -cf subman.tar.gz pack
rm -r pack