axetroy / vscode-nls-i18n

vscode library for supporting i18n
Apache License 2.0
12 stars 5 forks source link

the request of a dependency is an expression #42

Closed JohnstonCode closed 3 years ago

JohnstonCode commented 4 years ago

Getting this when trying to use this package with Webpack. Would you mind if i submitted a PR to fix this?

chouzz commented 3 years ago

I have the same problem. I got these warning when using Webpack.

WARNING in ./node_modules/vscode-nls-i18n/dist/index.js 70:36-85
Critical dependency: the request of a dependency is an expression
 @ ./src/extension.ts 9:26-52

WARNING in ./node_modules/vscode-nls-i18n/dist/index.js 75:14-39
Critical dependency: the request of a dependency is an expression
 @ ./src/extension.ts 9:26-52

I repalce 'require' with JSON.parse(fs.readFileSync(...)) in index.js line 70 and line 75, and it works fine.