-
Notifications
You must be signed in to change notification settings - Fork 18
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
Not webpack friendly #7
Comments
Indeed. The export cannot be statically resolved with the current UMD build. @darrylhodgins it would be cool to also provide a build with ES 2015 import/exports. The path can then be specified in the Workaround 1 - import the file directly: import { Memoize } from 'typescript-memoize/src/memoize-decorator'; Workaround 2 - set up a Webpack alias: resolve: {
alias: {
// The UMD build of typescript-memoize can't be statically resolved by Webpack.
// See https://github.com/darrylhodgins/typescript-memoize/issues/7
'typescript-memoize$': modulesRoot('typescript-memoize/src/memoize-decorator.ts')
}
} |
Workaround 1 gives me an error:
|
Check your tsconfig configuration so that this file can be included in the compilation. |
I'm using https://github.com/storybooks/storybook along with Typescript 2.4.2 -
storybook
useswebpack
to generate its output. When usingtypescript-memoize
, I get the following:I think this is due to how the export is defined within a function.
The text was updated successfully, but these errors were encountered: