{"id":13115,"library":"ember-cli-deploy-build","title":"Ember CLI Deploy Build Plugin","description":"The `ember-cli-deploy-build` package is a fundamental plugin within the `ember-cli-deploy` ecosystem, designed to facilitate the build process of Ember CLI applications as part of a continuous deployment pipeline. Its primary role is to compile and output all necessary application assets into a specified directory. It seamlessly integrates into the `ember-cli-deploy` workflow by implementing the `configure` and `build` pipeline hooks, handling tasks traditionally performed by `ember build`. The current stable version is 3.0.0, with a release cadence often tied to updates in Ember CLI itself and its underlying dependencies. This plugin differentiates itself by providing a robust, configurable build step that is abstracted and integrated directly into the deployment process, allowing developers to define build environments and output paths within their `config/deploy.js` file, ensuring consistency across deployments without manual intervention. It is not a standalone build tool but rather an essential component for automated Ember deployments.","status":"active","version":"3.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/ember-cli-deploy/ember-cli-deploy-build","tags":["javascript","ember-addon","ember-cli-deploy-plugin"],"install":[{"cmd":"npm install ember-cli-deploy-build","lang":"bash","label":"npm"},{"cmd":"yarn add ember-cli-deploy-build","lang":"bash","label":"yarn"},{"cmd":"pnpm add ember-cli-deploy-build","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"This package is a plugin for ember-cli-deploy and requires it to function within a deployment pipeline.","package":"ember-cli-deploy"}],"imports":[{"note":"Ember CLI plugins are discovered and loaded by `ember-cli-deploy` after installation. You configure its behavior in `config/deploy.js` rather than importing symbols into your JavaScript files.","symbol":"No direct JavaScript imports","correct":"This package is an Ember CLI addon/plugin. Its functionality is integrated via `ember install` and configuration in `config/deploy.js`, not through direct JavaScript `import` or `require` statements in application code."},{"note":"The plugin is configured as an object within the `config/deploy.js` file, under the `build` key, allowing you to specify parameters like `environment` and `outputPath`.","wrong":"import { build } from 'ember-cli-deploy-build';","symbol":"Configuration object in config/deploy.js","correct":"module.exports = function(deployTarget) { return { build: { environment: 'production', outputPath: 'dist' } }; };"}],"quickstart":{"code":"```bash\n# Install the plugin as an Ember CLI addon\nember install ember-cli-deploy-build\n\n# Open or create config/deploy.js (generated by ember-cli-deploy)\n# and configure the build plugin (example below)\n# This tells the 'build' plugin how to operate\n# Add this to your config/deploy.js (adjust as needed):\n```\n```javascript\n// config/deploy.js\nmodule.exports = function(deployTarget) {\n  const ENV = {\n    build: {\n      environment: deployTarget === 'production' ? 'production' : 'development',\n      outputPath: 'tmp/deploy-dist' // This is the default, but can be customized\n    },\n    // ... other deploy plugins or configurations\n  };\n\n  return ENV;\n};\n```\n```bash\n# Run the deployment pipeline; the 'build' plugin will execute automatically\nember deploy production\n```","lang":"javascript","description":"This quickstart demonstrates how to install the `ember-cli-deploy-build` plugin, configure its behavior (like target environment and output path) within your `config/deploy.js` file, and then initiate a production deployment which will trigger the build process."},"warnings":[{"fix":"Ensure your project's Node.js environment meets the minimum requirements of '14.* || 16.* || 18.* || >= 20' as specified in the package's engines field. Update Node.js if necessary.","message":"Version 3.0.0 introduces updated dependency requirements, including specific Node.js versions. Applications running on older Node.js versions may encounter errors.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Review your deployment strategy for hidden files. If you previously relied on them being excluded, you might need to implement explicit exclusion rules in a subsequent `ember-cli-deploy` plugin (e.g., `s3`) or adjust your build output if possible.","message":"Version 2.0.0 changed the default behavior to include hidden files (e.g., dotfiles like `.htaccess`) in the `distFiles` output, which affects what gets deployed.","severity":"breaking","affected_versions":">=2.0.0 <3.0.0"},{"fix":"To run tests for `ember-cli-deploy-build` itself, use `yarn test` as described in its documentation. For your application's tests, use `ember test` as usual.","message":"Running `ember test` directly for this package will not work as it is a Node-only Ember CLI addon and uses Mocha for testing, not the standard Ember CLI test runner.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Only use `EMBER_CLI_DEPLOY_REUSE_BUILD` when you are confident that your application code and build options (e.g., `environment`, `outputPath`) have not changed. Always perform a clean build for production deployments.","message":"For faster iteration during plugin development or configuration tweaking, you can set the `EMBER_CLI_DEPLOY_REUSE_BUILD` environment variable to reuse the previous build output, but this should be used cautiously.","severity":"gotcha","affected_versions":">=1.1.0"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Ensure the `build` object in your `config/deploy.js` includes an `environment` property, e.g., `build: { environment: 'production' }`.","cause":"The `environment` configuration option for the build plugin is missing or incorrectly defined in `config/deploy.js`.","error":"Error: The `build` plugin did not specify an `environment`."},{"fix":"Upgrade your Node.js installation to version 14, 16, 18, or 20, or newer, as specified by the package's `engines` field.","cause":"Your current Node.js version is older than the minimum required by `ember-cli-deploy-build` v3.0.0.","error":"Error: Node.js version not supported."},{"fix":"Verify that `ember-cli-deploy-build` is listed in your `package.json` and try running `npm install` or `yarn install` again. Ensure `ember-cli-deploy` itself is also properly installed.","cause":"The `ember-cli-deploy-build` package was not correctly installed or `ember-cli-deploy` cannot locate it.","error":"Plugin `build` could not be found or loaded."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":""}