awesome-typescript-loader
awesome-typescript-loader copied to clipboard
awesome-typescript-loader with custom tsconfig puts all code in one global chunk
So, e several days ago, when I tried to migrate from js to ts i had faced with issue in awesome-typescript-loader
plugin by using it with tsconfig.json
file. For now I cannot spite my code in chunks
as it had been with babel
loader. For now all my js
code just coupling together in one app.js
file. That's not very nice for me...
Also, if I removed my tsconfig.json
- awesome-typescript-loader
has starts to splite my code in chunks
normally as expected.
Environment: "awesome-typescript-loader": "^5.2.0", "typescript": "^3.0.1", "webpack": "^4.16.1",
Tsconfig.json file:
{
"compilerOptions": {
"allowJs": true,
"checkJs": false,
"module": "commonjs",
"target": "es5",
"jsx": "react",
"moduleResolution": "node",
"lib": ["es2015", "dom"]
},
"include": [
"src/**/"
]
}
Try changing "module": "commonjs"
to "module": "esnext"
@jacobrask interesting solution, but yes! It works!
Thank you, cheers! :)