In my Visual Studio Code Typescript project, I have set up some basic configurations and used npm to download libraries. One of the main files in my project is main.ts which includes the following code:
import ApexCharts from 'apexcharts'
var chart = new ApexCharts(document.querySelector("#chart"), {...});
chart.render();
I also have a tsconfig.json file with the following settings:
{
"compilerOptions": {
"module": "commonjs",
"noImplicitAny": true,
"removeComments": true,
"preserveConstEnums": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"target": "es5",
}
}
While my project compiles successfully, the output contains require() calls. Is there a way to configure the project build so that imported libraries are incorporated into the JavaScript output?
I would appreciate any suggestions on how to achieve this.