Skip to content

Commit 742c30f

Browse files
committed
fix: node_modules/common js 404
1 parent 8539fb9 commit 742c30f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

nuxt.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ require('dotenv').config();
22

33
const isProd = process.env.NODE_ENV === 'production';
44
const STATIC_URL = isProd
5-
? `https://${process.env.CDN_DOMAIN}/`
6-
: `http://localhost:${parseInt(process.env.PORT, 10) || 8000}/`
5+
? `https://${process.env.CDN_DOMAIN}`
6+
: `http://localhost:${parseInt(process.env.PORT, 10) || 8000}`
77

88
module.exports = {
99
head: {

serverless.yml

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ inputs:
1414
- "docs/**"
1515
- ".next/cache/**"
1616
- "node_modules/**"
17+
# must config this, because exclude will ignore all node_modules prefix path
18+
include:
19+
- .nuxt/dist/client/node_modules
1720
region: ${env:REGION}
1821
runtime: Nodejs12.16
1922
functionName: serverless-cnode-nuxtjs

0 commit comments

Comments
 (0)