I am facing an issue in my webpack configuration while trying to minify the output bundle when working with TypeScript. Currently, only one file has been migrated to TypeScript in my project and it works fine with babel-node and the dev bundle without Uglify. But, as soon as I switch to the prod bundle, I encounter the following error:
ERROR in main.ab0b2e37030c63351bb8.js from UglifyJs
SyntaxError: Unexpected token: name (App) [./components/App.ts:12,0]
This is how my webpack config looks like:
const config = {
// Your webpack configuration goes here
};
// Your App.ts code snippet goes here
export default App