Setup `import/no-extraneous-dependencies` eslint rule to prevent extraneous dependencies being used in modular.

steveukx created this issue on 2021-11-10 · The issue is replied 0 times

The default and more common use case for modular-scripts is to build with Webpack, switching to esbuild by setting the environment variable USE_MODULAR_ESBUILD currently throws an exception due to missing dependencies.

The modular-scripts package in the modular monorepo references tmp which is present in the workspace as it's a transitive dependency of the workspace dependency patch-package, but it's not loaded in the packaged modular-scripts.

Options for solving this include documenting the missing dependencies where they are intentionally excluded from the bundle (listing them as peerDependencies would make them easy to find, or include them as part of a readme that documents the environment variable), or explicitly adding missing dependencies to the dependencies section of the package.json.

Using the import/no-extraneous-dependencies lint rule would help ensure future releases contain references to dependencies that could otherwise be missed.

🤔
Didn't find what you were looking for ?
Create your own issue
More Details About Repo
Owner Name jpmorganchase
Repo Name modular
Full Name jpmorganchase/modular
Language TypeScript
Created Date 2020-05-21
Updated Date 2022-01-15
Star Count 538
Watcher Count 18
Fork Count 28
Issue Count 34

YOU MAY BE INTERESTED

Issue Title State Comments Created Date Updated Date Closed Date