I am trying to package my first vscode extension that I have tested under debugger.
In package.json, in scripts list, I have added the line
"package": "webpack --mode production --devtool hidden-source-map"
I used the recommended webpack.config.js
file with minimal modifications (entry: the top JS file, extensions: I added ‘.js’). I have NOT changed the module part that I don’t understand the role and which is not explained in the tuto.
I succeeded to invoke the webpack command under vscode.
All sources have correctly built.
But then I get error for all required node.js modules (my own sub-modules seem to be correctly found).
The errors say:
Module not found: Error: Can't resolve '<the node.js module name>' in '<source directory>'
The line pointed by the error reads:
const <the node.js module name> = require('<the node.js module name>');
Lot of people have similar errors but not in same context so I found no solution that I feel applicable in my case.