core icon indicating copy to clipboard operation
core copied to clipboard

DTS Plugin, generate Types path

Open svenbrosi opened this issue 1 year ago • 0 comments

Clear and concise description of the problem

When defining Typescript remotes we can set a path for mf-manifest.json but types are always created in dist without a sub path.

Withing modernjs server those files cannot be accessed. Please enable a param for dts like for manifest

name: 'my_provider',
          exposes: {
            './Container': './src/components/MyContainer.tsx',
          },
          manifest: {
            filePath: '/modules/container/static/js',
          },
          dts: {
            generateTypes: {
              typesPath: '/modules/container/static/js
              typesFolder: 'mf-container-types',
            },
          },
          shared: ['react', 'react-dom'],
        }),

Suggested solution

Use the same path as given for mf-manifest.json by default and enable developers to define a custom path via dts generateTypes.typesPath

Alternative

provide the types in js asset folder

Additional context

No response

Validations

  • [X] Read the Contributing Guidelines.
  • [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

svenbrosi avatar Apr 22 '24 09:04 svenbrosi