问题
I want to create dist folder, after running 'npm build'(nuxt build) in amplify.
I run npm build in my local(mac) , then dist folder is created.
I run 'ls -a' after 'npm build' , then dist folder does not exist in amplify.
> 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
here is 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"
},
here is 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/**/*
I am waitng for your answer , thanks.
来源:https://stackoverflow.com/questions/57565766/npm-build-nuxt-build-does-not-create-dist-folder-in-amplifyaws-codebuild-usi