I get an error when importing a module at CMS's administrator page.
I use registerPreviewTemplate in cms.js and the error occurs at “import” in the component file loaded with it.
In the component file, I use alias like import MyStyle from "@common/Style".
But, cms.js cannot interpret the alias.
Describe the bug
I get an error when importing a module at CMS's administrator page.
I use
registerPreviewTemplate
in cms.js and the error occurs at “import” in the component file loaded with it. In the component file, I use alias likeimport MyStyle from "@common/Style"
. But, cms.js cannot interpret the alias.To Reproduce
1,
npx decap-server
npx gatsby develop
The files are organized as follows.
cms.js
layout.js
config.yml
gatsby-config.js
gatsby-node.js
jsconfig.json
Expected behavior
Screenshots
Applicable Versions:
CMS configuration
Additional context