Closed M0nica closed 3 years ago
I don't understand why this is necessary? Shouldn't ts files be reading other ts files?
I don't understand why this is necessary? Shouldn't ts files be reading other ts files?
I was running into issues when trying to use the webpub-viewer
's dist files in circulation-patron-web
with the imports not being able to resolve. In webpub-viewer
's static example we were solving resolving the imports that by passing the express server extensions: ["js"]
so if an import was looking for ./Foo
and ./Foo
didn't exist it would also look for ./Foo.js
and resolve to that if it it exists.
I am going to close this as this was resolved by adding const withTM = require("next-transpile-modules")([ "library-simplified-webpub-viewer" ]);
to the next-config in the consumer (circulation-patron-web).