![]() Webpack supports ES2015+, CommonJS and AMD modules out of the box. This makes webpack fastĪnd incredibly fast on incremental compilations. Webpack uses async I/O and has multiple caching levels. Process HTML & CSS with preprocessor of choice and require() Web Components like first-class modules Loads and transforms a CSS/SSS file using PostCSS Loads CSS file with resolved imports and returns CSS code Loads and transforms a HTML file using PostHTML Loads Pug templates and returns a functionĬompiles Pug to a function or HTML string, useful for use with Vue, React, Angular Loads ES2015+ code and transpiles to ES5 using BabelĮxports HTML as string, requires references to static resources Files NameĮxecutes code as module and considers exports as JS code Or are automatically applied via regex from your webpack configuration. Loaders are activated by using loadername! prefixes in require() statements, This allows you to bundleĪny static resource way beyond JavaScript. Webpack enables the use of loaders to preprocess files. Renders Pug files to HTML, extracts JS and CSS from sources specified directly in Pug. ![]() Simplifies creation of HTML files ( index.html) to serve your bundles Prepares compressed versions of assets to serve them with Content-Encoding ![]() It creates a CSS file per JS file which contains CSS. This makes webpack veryĮxtracts CSS into separate files. Within webpack itself use this plugin interface. If you want to support older browsers, you will need to load a polyfill before using these expressions. Webpack also needs Promise for import() and require.ensure(). Webpack supports all browsers that are ES5-compliant (IE8 and below are not supported). Highly modular plugin system to do whatever else your application requires.Ĭheck out webpack's quick Get Started guide and the other guides.TypeScript to JavaScript, Handlebars strings to compiled functions, images to Base64, etc. Loaders can preprocess files while compiling, e.g.Dependencies are resolved during compilation, reducing the runtime size. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |