简体   繁体   中英

Dist folder is not getting created while building a single-spa root node app

I developed a micro-front end UI app, the application is running on local by npm start command, but now I want to deploy it, for that I need to publish it using build command, when I am trying to run npm build --prod or just npm build , its not throwing any error but I don't see any dist folder created in my app root folder. Below is my package.json and app structure:

{
  "name": "root-html-file",
  "description": "The single-spa root config for coexisting-angular-microfrontends",
  "main": "index.js",
  "scripts": {
    "start": "serve -s -l 4200",
  },
  "author": "Joel Denning",
  "license": "MIT",
  "devDependencies": {
    "serve": "^11.1.0"
  },
  "dependencies": {}
}

在此处输入图片说明

Dist folder is not getting created while building a single-spa root node app

When we build the app on the azure cloud server, Azure devops will checkout the source code from the repo to the build agent. Then the output of the build pipeline will save on this agent instead of our repo.

So, we could not see the dist folder from the repo. It is saved in the local folder on the agent. We need use the copy files and publish build artifact task to publish build artifacts to Azure Pipelines.

在此处输入图片说明

Note: The Source Folder in the copy files task should be Agent.BuildDirectory or System.DefaultWorkingDirectory instead of directly selecting the path in the repo through the extension button.

If above not help you, please share you build log, so that we could check if the dist folder created or not.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM