Closed hallgren closed 6 years ago
The owner of the test project has submitted a fix that uses custom @type from typescript o fix my issue.
Hello, how have you solved the problem ? I have the same error : Cannot find name '___' Thanks
@Julien2 The solution to this is not on the top of my mind. But looking at the test repo I linked to in the description I think this line solved the issue: declare function ___(str: string): any;
@hallgren I've added declare function myFunctionName(str: string): any;
into a new file i18n.d.ts
It works perfectly !
Thanks !
When I use typescript in the combination with i18n-webpack-plugin I get the following Error:
It seams to me that the '__' function is not replaced with the translation before the execution of the ts-loader.
Link to test project
My Setup
Windows 10 pro version 1703 node 6.11.2 npm 3.10.10
webpack@3.6.0 ts-loader@2.3.7 / awesome-typescript-loader@3.2.3 i18n-webpack-plugin@1.0.0
Stacktrace
The output when
npm run start
on the test project.