siberiacancode / mock-config-server

🎉 tool that easily and quickly imitates server operation, create full fake api in few steps
https://www.npmjs.com/package/mock-config-server
MIT License
91 stars 4 forks source link

init error: templatePath is valid only for development #165

Closed MiaInturi closed 5 months ago

MiaInturi commented 7 months ago
export const createTemplate = (options: CreateTemplateOptions) => {
  const language = options.withTypescript ? 'ts' : 'js';
  const templatePath = `dist/bin/templates/${language}/${options.apiType}`;
  ...
  ...
}

tempatePath variable is incorrect, because when this code run from node_modules there is no dist dir