Remove dependency to `vscode-nls`
jtheoof opened this issue · 2 comments
This is a great parser.
However the fact that it relies on vscode-nls
make it less suitable in a browser environment. vscode-nls
pulls fs
(node filesystem core lib) which is not available in browser. Also it's doing some dynamic require
which is not wepback-safe:
{
"node": {
"fs": "empty"
}
}
WARNING in ./~/vscode-nls/lib/main.js
118:23-44 Critical dependency: the request of a dependency is an expression
Without the empty
config for fs
I would get:
WARNING in ./~/vscode-nls/lib/main.js
118:23-44 Critical dependency: the request of a dependency is an expression
ERROR in ./
/vscode-nls/lib/main.js/vscode-nls/lib/main.js 7:9-22
Module not found: Error: Can't resolve 'fs' in '/Users/jattali/dev/mnubo/front-end/node_modules/vscode-nls/lib'
@ ./
@ ./~/jsonc-parser/lib/main.js
Since vscode-nls
is only used for localizations of error, I would say it's not critical to remove it.
What do you think @aeschli ?
good point. I removed the nls dependency with c8c06cc.
Released as jsonc-parser@1.0.0
Thanks this is great!