@needle-tools/engine
Version:
Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development with great integrations into editors like Unity or Blender - and can be deployed onto any device! It is flexible, extensible and networking and XR are built-in.
26 lines (23 loc) • 757 B
JavaScript
/**
* @param {"build" | "serve"} command
* @param {import('../types/needleConfig').needleMeta | null | undefined} config
* @param {import('../types').userSettings} userSettings
* @returns {import('vite').Plugin}
*/
export function needleBuild(command, config, userSettings) {
// TODO: need to set this when building a dist
const isDeployOnlyBuild = config?.deployOnly === true;
return {
name: 'needle-build',
config(config) {
if (!config.build) {
config.build = {};
}
if (isDeployOnlyBuild)
{
console.log("Deploy only build - will not empty output directory")
config.build.emptyOutDir = false;
}
}
}
}