Select to view content in your preferred language

Code sharing

136
0
3 weeks ago
majae
by
New Contributor

Hello! I am trying to use code sharing in my project (https://developers.arcgis.com/experience-builder/guide/share-code-between-widgets/#shared-entry). I am using the shared entry method. My folder structure is as follows,
widgets/
  shared-code/
    entry1.ts
    lib/
      entry1/
        myCustomButton.tsx
        translations/
          default.ts
          sv.js


I am able to import 'myCustomButton' using "import { sampleFunction } from 'widgets/shared-code/entry1'" as instructed in the guide.

 

But, i have two problems.
1. The translation file 'sv.js' never runs.
2. The entry file 'entry1.ts' is not generated on build. 

Does anyone know how i solve these problems?

Thanks in advance!

0 Kudos
0 Replies