I've got one theoretical question: I'm developing using by Angular2 and Webpack and it works fine for me. But the native Angular2 uses RequireJs (or another asynchronous module definition) to load additional js files on fly and on demand. But webpack gathers all files-modules in one file which load right when an application starts. And I thought that the "on demand" (asynchronous module definition) loading is more optimized than the webpack using. Could you help me to understand the webpack advantages in this case?
Is Webpack approach more optimized than RequireJs (or another AMD)?
176 Views Asked by user2617591 At
1
There are 1 best solutions below
Related Questions in ANGULAR
- Firebase link existing user to anonymous account?
- It doesnt always show all the books on my homepage
- Google adsense ads.txt status cannot be not found
- When I navigate to the URL'http://localhost:4200/', it redirects me back
- Ionic Angular Standalone ion-icon are not showing at all
- How to make Angular understand that view child is of a specific type, not a general ElementRef?
- vscode, debug angular, first time, doesn't debug, 2nd time stops at main.js then it's ok
- How to perform CRUD operations on a static JSON array in Angular? (without API)
- Ngrx props<>() method in createAction()
- How to animate rotation of an image inside input control?
- Detecting click inside and outside of the listening component in Angular
- Angular - type guard not narrowing types
- In node_modules file i am getting Angular genric error while using fontawesome in angular12
- Angular 16 sending null values to API
- GoogleCloud Error: Not Found The requested URL was not found on this server
Related Questions in WEBPACK
- storybook 7 does not recognize module declarations
- webpack module federation "could not find react-redux context value; please ensure the component is wrapped in a <Provider"
- The webpack bundle created and stored in the project directory is different than the one used to run the application with webpack-dev-server
- Webpack Federated module's Production build fails with "Self-reference dependency has unused export name" when importing lodash
- Webpack outputting too many files
- Browserify Error: Uncaught TypeError: Unable to determine current node version in bundle.js
- Vanilla extract Next.js storybook: Can't resolve @vanilla-extract/css/recipe'
- Uncaught TypeError: _projects_js__WEBPACK_IMPORTED_MODULE_2__.default is undefined
- How to force angular while executing take files from /dist folder (now webpack takes them from it's memory)
- Vue3 cannot import `@cornerstone/tools` , with error `ICRPolySeg.wasm`
- Webpack Module Federation remote.js not updating (possibly cached)
- Adding Submodule Paths in a Vite React Library
- Webpack 5 - Error: Module parse failed: Unexpected character '@'
- Rollup : Uncaught TypeError: Cannot destructure property 'class' of 'object null' as it is null
- Can not find module "uiohook-napi" after installation .exe in electron forge
Related Questions in REQUIREJS
- Node.js import results in ERR_MODULE_NOT_FOUND
- Magento2 : How to add custom validation to the dynamic rows created using UI component
- requireJS element is not a function
- Webpack warning "the request of a dependency is an expression" goes away using template strings instead of variables. How?
- I have an error with my singleton design pattern
- How to use RxJs with Require.JS
- Why jest.spyOn doesn't invalidate module cache when requiring single function?
- Cypress + RequireJS: How to ESM import define from RequireJS?
- Flutter web project with javascript modules that use requireJS (Monaco editor in Flutter web)
- how to render amd module in react project
- require() turns space separeted string into an array
- Unable to resolve "../assets/srt/Audio2.srt" from "components\PlayerSound.js", how can I fix it?
- Require independent instances of module inside class
- lazy loading in angularJs
- Form Navigation in Temenos Quantum Visualizer
Related Questions in AMD
- Unexpected OS Shutdown
- Having issue with CPU boosting on AMD
- Compiling hip code using hipcc -O0 for AMD GPU
- GPGPU with Radeon Pro VII in Windows
- Human Detection After the Machine in Twilio
- How can I fix AMD Radeon 5600 XT windows 31 error?
- AMD Software Host Application Pop-Up on startup
- Ledctl does not work with AMD Epyc platform
- How to compile clang llvm to amd gcn on linux ubuntu
- How to open lod clamp specified in shader in glsl?
- how to render amd module in react project
- Deepspeed not offloading to CPU
- GLX_EXT_context_priority not supported on SteamOS?
- How to use Asynchronous Module Definitions(AMD) in SS2.1?
- Unable to use property of youtube player after importing into another module
Related Questions in COMMONJS
- how do I create code transformer for parsing customized extension like JSX?
- serverless-offline module --> Cannot use import statement outside a module
- TypeError: Cannot convert object to primitive value when trying to use template literal in require(`${some_var_string}`)
- How do you combine subpath exports, environment conditional exports, and module system conditional exports in the same package.json?
- Using TypeScript in Node.js project with "module": "commonjs"
- How to compile typescript to use CommonJS and import/export?
- How to build TypeScript/MJS package compatible with NodeJs?
- Trying to import KcAdminClient
- Cannot import ESM modules when modifying require.extensions
- Import ESM libraries into commonjs project Error [ERR_REQUIRE_ESM]: require() of ES Module -
- Exposed and private/local members in CommonJS modules
- require() of ES Module \node_modules\string-width\index.js from \node_modules\wide-align\align.js not supported
- Jest : SyntaxError: Cannot use import statement outside a module
- How to make default export compatible with CommonJS
- Testing CommonJS with dynamic imports of ESM with ts-jest
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
It used to be System.js, but webpack is now part of angular cli.
You can make several bundles too, you don't have to produce just one file. but it's true that webpack is not meant to be an asynchronous module loader.
Webpack does no loading on the fly but makes bundling easy. With angular 2 you don't have to worry about how you will load your modules because they can be lazy-loaded with the router, there are available configurations for both webpack and system.js.
So it's just a "matter of style" if you feel more comfortable with system.js, go for it, if you feel more comfortable with webpack, go for webpack or if you just don't care of the bundling system, go for angular-cli.