From f111e3bab0b9b83d899ace156e87428e9b74ec7a Mon Sep 17 00:00:00 2001 From: Enrique Arias Date: Sat, 25 Apr 2020 14:29:55 +0200 Subject: [PATCH] package.json defines main entry to template.json Added description to make sure that new template packages includes in their `packages.json` the main prop pointing to `template.json`. --- docusaurus/docs/custom-templates.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docusaurus/docs/custom-templates.md b/docusaurus/docs/custom-templates.md index de7906a5b9f..8daa9df4064 100644 --- a/docusaurus/docs/custom-templates.md +++ b/docusaurus/docs/custom-templates.md @@ -44,6 +44,14 @@ cra-template-[template-name]/ index.js (or index.tsx) ``` +Ensure that `package.json` declares its main entry point to `template.json`. On the other hand, the template won't work. + +```json +{ + "main": "template.json' +} +``` + ### Testing a template To test a template locally, pass the file path to the directory of your template source using the `file:` prefix.