{"id":27704,"library":"dong-build","title":"dong-build","description":"dong-build is a build tool for view and static file processing, part of the dong ecosystem. Current version 0.4.5, with sporadic releases. It serves as a build helper for the dong framework, focusing on compiling views and handling static assets. Compared to full-featured bundlers like webpack or Vite, dong-build is minimal and tightly coupled with dong, making it suitable only within that ecosystem. The package is deprecated in favor of more modern tooling.","status":"deprecated","version":"0.4.5","language":"javascript","source_language":"en","source_url":"git://github.com/crossjs/dong-build","tags":["javascript","build","view","static"],"install":[{"cmd":"npm install dong-build","lang":"bash","label":"npm"},{"cmd":"yarn add dong-build","lang":"bash","label":"yarn"},{"cmd":"pnpm add dong-build","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only. CommonJS require will not work.","wrong":"const dongBuild = require('dong-build');","symbol":"dongBuild","correct":"import dongBuild from 'dong-build';"},{"note":"Named export available. Ensure ESM.","wrong":"const { build } = require('dong-build');","symbol":"build","correct":"import { build } from 'dong-build';"},{"note":"TypeScript type import only; not a runtime value.","wrong":"import { BuildOptions } from 'dong-build';","symbol":"type BuildOptions","correct":"import type { BuildOptions } from 'dong-build';"}],"quickstart":{"code":"import { build } from 'dong-build';\nimport { resolve } from 'path';\n\nconst root = resolve(process.cwd(), 'src');\nconst output = resolve(process.cwd(), 'dist');\n\nbuild({\n  root,\n  output,\n  views: 'views/**/*.html',\n  static: 'static/**/*'\n}).then(() => {\n  console.log('Build complete');\n}).catch(err => {\n  console.error('Build failed', err);\n});","lang":"javascript","description":"Basic usage: import build function and call with configuration for views and static files."},"warnings":[{"fix":"Switch to Vite or Webpack.","message":"Package is deprecated and no longer maintained. Use modern bundlers like Vite or Webpack.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Use import syntax and ensure Node version or bundler supports ESM.","message":"ESM-only; requires Node.js >=12 or bundler support for ES modules.","severity":"gotcha","affected_versions":">=0.4.0"},{"fix":"Refer to documentation for 0.4.x API.","message":"API changed between versions 0.3.x and 0.4.x; options object structure changed.","severity":"breaking","affected_versions":">=0.4.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Install with npm install dong-build@0.4.5","cause":"Package not installed or incorrect import path.","error":"Cannot find module 'dong-build'"},{"fix":"Use import instead of require().","cause":"Attempted to require() an ES module.","error":"ERR_REQUIRE_ESM"},{"fix":"Use import { build } from 'dong-build';","cause":"Incorrect import: imported default instead of named export.","error":"TypeError: build is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}