Closed kapitanluffy closed 2 years ago
The problem is that you are using JS file for browsers in Node.js.
You should not run JS bundle after webpack in Node.js.
Do you mind elaborating? What I do is transpile ts files with webpack using babel and run the transpiled file in dist directory. Is there something wrong with the webpack config?
Webpack is generating files for browsers. They will not be compatible with Node.js because some JS API are different in browser and Node.js.
There are two options:
here's the tsconfig
here's babel
here's webpack