Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DTS Plugin, generate Types path #2358

Open
2 tasks done
svenbrosi opened this issue Apr 22, 2024 · 0 comments
Open
2 tasks done

DTS Plugin, generate Types path #2358

svenbrosi opened this issue Apr 22, 2024 · 0 comments
Assignees

Comments

@svenbrosi
Copy link

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

  • Read the Contributing Guidelines.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants