I am new to webpack
and angular-cli
. My problem is that when I create an Angular 4 project using angular-cli
, everything works fine with ng-serve
but everything get bundled by default. Web pack bundling info:
I am not able to see the component.ts files in browser to debug. Is there any way to disable the bundling? angular-cli
version details:
How To Disable Differential Loading in Angular Applications. Adjust browserslist to only consider the web browsers that we actually want to support. Ensure that we have specified "target": "es2015" as the target in tsconfig. json .
bundle. js which includes all the scripts to fill the gap between the version of Javascript that Angular needs and the version of Javascript supported by most browsers. polyfills.bundle.js. Here we can see👇 another bundle which is a main. bundle.
Sentry supports demangling of transpiled, minified, and bundled JavaScript using source maps, which are JSON files that contain information about how to map your deployed code back to its original source(s).
A project's src/environments/ folder contains the base configuration file, environment. ts , which provides a default environment. You can add override defaults for additional environments, such as production and staging, in target-specific configuration files. For example: myProject/src/environments.
When you do ng serve
with the CLI, it will create sourcemap files by default. That means, that although the source files are bundled together, you can view the original source files in the debugger and step through them.
You find them in the DevTools under the tab Sources, the folder webpack://
If you want to view your prod build like this, you can add the flag -sm for sourcemaps. In the prod build, there won't be sourcemaps by default.
ng serve --prod -sm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With