gpt4 book ai didi

vue.js - npm build(nuxt build)不使用nuxt spa模式在amplify(aws codebuild)中创建dist文件夹

转载 作者:行者123 更新时间:2023-12-03 06:42:03 25 4
gpt4 key购买 nike

我要在运行'npm build'(nuxt build)后创建dist文件夹。

我在local(mac)中运行npm build,然后创建dist文件夹。

我在'npm build'之后运行'ls -a',然后dist文件夹在放大中不存在。

                                 > nuxt build
2019-08-20T01:49:08.598Z [INFO]: # Executing command: ls -a
2019-08-20T01:49:08.602Z [INFO]: .
..
amplify.sh
amplify.yml
assets
components
.editorconfig
.eslintrc.js
.git
.gitignore
layouts
middleware
node_modules
.nuxt
nuxt.config.js
package.json
package-lock.json
pages
plugins
.prettierrc
README.md
static
store
.vscode
yarn.lock
# Completed phase: build

这是package.json
    {
...
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
"precommit": "npm run lint"
},

这是amplify.yml
version: 0.1
frontend:
phases:
preBuild:
commands:
- npm install
build:
commands:
- npm run build
- ls -a
artifacts:
# IMPORTANT - Please verify your build output directory
baseDirectory:
dist
files:
- '**/*'
cache:
paths:
- node_modules/**/*

我在等你的回答,谢谢。

最佳答案

我解决了设置amplify.yml文件的问题。我将baseDirectory: dist更改为baseDirectory: .nuxt

关于vue.js - npm build(nuxt build)不使用nuxt spa模式在amplify(aws codebuild)中创建dist文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57565766/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com