Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <[email protected]>
  • Loading branch information
Innei committed Feb 4, 2024
1 parent 12351b9 commit 6963140
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ steps:
commands:
- 'npm i -g pnpm'
- 'pnpm install --no-frozen-lockfile'
- 'npm run build'
- 'npm run build:ci'

depends_on:
- restore-cache
Expand Down
9 changes: 8 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import path from 'path'
import { config } from 'dotenv'

import NextBundleAnalyzer from '@next/bundle-analyzer'
Expand All @@ -10,7 +11,7 @@ const isProd = process.env.NODE_ENV === 'production'
/** @type {import('next').NextConfig} */
// eslint-disable-next-line import/no-mutable-exports
let nextConfig = {
reactStrictMode: false,
reactStrictMode: true,
productionBrowserSourceMaps: true,
output: 'standalone',
assetPrefix: isProd ? env.ASSETPREFIX || undefined : undefined,
Expand Down Expand Up @@ -48,6 +49,12 @@ let nextConfig = {
},

webpack: (config, options) => {
const __dirname = new URL('./', import.meta.url).pathname
config.resolve.alias['jotai'] = path.resolve(
__dirname,
'node_modules/jotai',
)

config.externals.push({
'utf-8-validate': 'commonjs utf-8-validate',
bufferutil: 'commonjs bufferutil',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"dev:turbo": "cross-env NODE_ENV=development next dev -p 2323 --turbo",
"analyze": "cross-env NODE_ENV=production ANALYZE=true BUNDLE_ANALYZE=browser next build",
"build": "cross-env NODE_ENV=production next build",
"build:ci": "cross-env NODE_ENV=production CI=true next build",
"build:ci": "cross-env NODE_ENV=production NODE_OPTIONS=--max_old_space_size=4096 NEXT_TELEMETRY_DISABLED=1 CI=true next build",
"lint": "eslint --ext .ts,.tsx --ignore-path .gitignore . --fix",
"prod:pm2": "cross-env NODE_ENV=production pm2 restart ecosystem.config.js",
"prod:stop": "pm2 stop ecosystem.config.js",
Expand Down
2 changes: 1 addition & 1 deletion standalone-bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CWD=$(pwd)
cd .next
pwd
rm -rf cache
cp ../next.config.mjs ./standalone/next.config.mjs
# cp ../next.config.mjs ./standalone/next.config.mjs
cp -r ../public ./standalone/public

cd ./standalone
Expand Down

0 comments on commit 6963140

Please sign in to comment.