-
-
Notifications
You must be signed in to change notification settings - Fork 431
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
Webpack 2.0 - Cannot read property 'unsafeCache' of undefined #283
Comments
+1 heeeelp |
I switched to https://github.com/s-panferov/awesome-typescript-loader. Works fine. |
I'm afraid ts-loader is untested with WebPack 2 to my knowledge. awesome-typescript-loader is probably the best choice if you're after WebPack 2.0 support now. Myself I haven't used 2.0 as it's still in beta (and 1 handles my use cases) |
For me, this only happens when I use the new LoaderOptionsPlugin({
debug: false,
options: { ... }
}) Remove new LoaderOptionsPlugin({
debug: false,
options: {}
}) |
I tried @r-park @johnnyreilly @donaldpipowitch @josiah1888 by new LoaderOptionsPlugin({
debug: false,
options: {
resolve: {}
}
}) Everything runs again. |
Thanks @jeffijoe - we should probably include this in the docs somewhere to improve discovery. Well done for finding out! |
@jeffijoe: Thanks! That did the trick for me also! |
Also switched to |
The workaround isn't really a workaround as the resolver is not properly configured if you pass in an empty resolve object. The issue is that when |
@jeffijoe Your workaround seems to work for me now without visible problems. But it would be great if the workaround wouldn't be needed. |
@donaldpipowitch Me too, this is how I feel about it: |
Would someone like to submit a PR to resolve this? |
I've documented the workaround in the readme here: https://github.com/TypeStrong/ts-loader#webpack |
We now have an example in our examples section which demonstrates using ts-loader with webpack 2. I'm still not sure if the unsafe cache thing is actually a ts-loader issue; it feels like required configuration. FWIW in our example we supply all the webpack config options to the loader options plugin. |
The workaround is now documented on the readme and since this is for the Loader Options Plugin which is due to be short-lived I'm going to close this |
Please read right to the bottom of this thread for an approach that seems to work.
Using
webpack@2.1.0-beta.23
:Used as:
The text was updated successfully, but these errors were encountered: