dividab / tsconfig-paths-webpack-plugin

Load modules according to tsconfig paths in webpack.
MIT License
596 stars 51 forks source link

does not work with dynamic import #101

Open taozhou-glean opened 1 year ago

taozhou-glean commented 1 year ago

my folder structure looks like following:

- data
  - web
- web
  - data (symlink to data/web)
  - other things
  - tsconfig.json

and with tsconfig setting the right path for web/*: ["./web/*"], I am getting Module not found: Error: Can't resolve 'web/data infor usage likeimport {} from "web/data/xxx". But switch to usealias` does work just fine, so it seems that the plugin does not work great with symlinks

taozhou-glean commented 1 year ago

I think the issue might be a more about dynamic import, for more context, this is for making it work with lingui, an i18n framework, https://js-lingui-qmrh9gqtf-lingui.vercel.app/guides/dynamic-loading-catalogs, looks like the dynamic import is the problem: web/data/${locale}/message