New 3 Flashcards
Webpack itself only understands
JavaScript files
Teach Webpack to transform non-JavaScript file into their JavaScript equivalents with
loaders
Webpack is a popular
module bundler
a module bundler is
a tool for bundling source code in convenient chunks and for loading that code from a server into a browser
A bundle is a JavaScript file that incorporates
assets that belong together and should be served to the client in a response to a single file request
A bundle can include
JavaScript, CSS styles, HTML, and almost any other kind of file
Webpack roams over
your application source code, looking for import statements, building a dependency graph, and emitting one or more bundles
With plugins and rules, Webpack can
preprocess and minify different non-JavaScript files such as TypeScript, SASS, and LESS files
What are entry files?
You supply Webpack with one or more entry files and let it find and incorporate the dependencies that radiate from those entries
For webpack output, it’s preferable to separate ___ from ___
the volatile application app code from comparatively stable vendor code modules
To tell Webpack what belongs in the vendor bundle
add a vendor.ts file that only imports the application’s third-party modules
To reference a CSS include from TS
import ‘uiframework/dist/uiframework.css’;
How to chain two loaders together
loaders: ‘style-loader!css-loader’
You’ll need ___ to run an Angular application in most browsers as explained in ___
polyfills / the Browser Support guide
Polyfills should be bundled separately from
the application and vendor bundles