JSPM

webpack

0.11.0-beta18
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 32682375
  • Score
    100M100P100Q203706F

Packs CommonJs/AMD/Labeled Modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jade, coffee, css, less, ... and your custom stuff.

Package Exports

  • webpack
  • webpack/bin/config-optimist
  • webpack/bin/convert-argv
  • webpack/bin/webpack
  • webpack/bin/webpack.js
  • webpack/hot/dev-server
  • webpack/hot/dev-server.js
  • webpack/hot/poll
  • webpack/lib/AbstractPlugin
  • webpack/lib/ArrayMap
  • webpack/lib/AsyncDependenciesBlock
  • webpack/lib/BannerPlugin
  • webpack/lib/BasicEvaluatedExpression
  • webpack/lib/CachePlugin
  • webpack/lib/Chunk
  • webpack/lib/CompatibilityPlugin
  • webpack/lib/Compilation
  • webpack/lib/Compiler
  • webpack/lib/ConstPlugin
  • webpack/lib/ContextModule
  • webpack/lib/ContextModuleFactory
  • webpack/lib/ContextReplacementPlugin
  • webpack/lib/DefinePlugin
  • webpack/lib/DependenciesBlockVariable
  • webpack/lib/Dependency
  • webpack/lib/Dependency.js
  • webpack/lib/EvalDevToolModulePlugin
  • webpack/lib/FunctionModulePlugin
  • webpack/lib/HotModuleReplacementPlugin
  • webpack/lib/JsonpTemplatePlugin
  • webpack/lib/LibraryTemplatePlugin
  • webpack/lib/MemoryOutputFileSystem
  • webpack/lib/Module
  • webpack/lib/ModuleNotFoundError
  • webpack/lib/ModuleParseError
  • webpack/lib/ModuleParserHelpers
  • webpack/lib/MultiEntryPlugin
  • webpack/lib/MultiEntryPlugin.js
  • webpack/lib/MultiModule
  • webpack/lib/MultiModuleFactory
  • webpack/lib/NodeStuffPlugin
  • webpack/lib/NormalModule
  • webpack/lib/NormalModule.js
  • webpack/lib/NormalModuleFactory
  • webpack/lib/NormalModuleReplacementPlugin
  • webpack/lib/NullFactory
  • webpack/lib/NullFactory.js
  • webpack/lib/Parser
  • webpack/lib/Parser.js
  • webpack/lib/PrefetchPlugin
  • webpack/lib/ProgressPlugin
  • webpack/lib/ProgressPlugin.js
  • webpack/lib/ProvidePlugin
  • webpack/lib/RequestShortener
  • webpack/lib/SingleEntryPlugin
  • webpack/lib/Source
  • webpack/lib/SourceMapDevToolPlugin
  • webpack/lib/Stats
  • webpack/lib/Stats.js
  • webpack/lib/Template
  • webpack/lib/WebpackOptionsApply
  • webpack/lib/WebpackOptionsDefaulter
  • webpack/lib/dependencies/AMDDefineDependency
  • webpack/lib/dependencies/AMDDefineDependencyParserPlugin
  • webpack/lib/dependencies/AMDPlugin
  • webpack/lib/dependencies/AMDPlugin.js
  • webpack/lib/dependencies/AMDRequireContextDependency
  • webpack/lib/dependencies/AMDRequireDependenciesBlock
  • webpack/lib/dependencies/AMDRequireDependenciesBlockParserPlugin
  • webpack/lib/dependencies/AMDRequireDependency
  • webpack/lib/dependencies/AMDRequireItemDependency
  • webpack/lib/dependencies/CommonJsPlugin
  • webpack/lib/dependencies/CommonJsRequireContextDependency
  • webpack/lib/dependencies/CommonJsRequireDependency
  • webpack/lib/dependencies/CommonJsRequireDependency.js
  • webpack/lib/dependencies/ConstDependency
  • webpack/lib/dependencies/ConstDependency.js
  • webpack/lib/dependencies/ContextDependency
  • webpack/lib/dependencies/ContextDependencyHelpers
  • webpack/lib/dependencies/ContextDependencyTemplateAsId
  • webpack/lib/dependencies/ContextDependencyTemplateAsRequireCall
  • webpack/lib/dependencies/ContextElementDependency
  • webpack/lib/dependencies/ModuleDependency
  • webpack/lib/dependencies/ModuleDependency.js
  • webpack/lib/dependencies/ModuleDependencyTemplateAsId.js
  • webpack/lib/dependencies/ModuleDependencyTemplateAsRequireId
  • webpack/lib/dependencies/ModuleHotAcceptDependency
  • webpack/lib/dependencies/ModuleHotDeclineDependency
  • webpack/lib/dependencies/MultiEntryDependency
  • webpack/lib/dependencies/NullDependency
  • webpack/lib/dependencies/NullDependency.js
  • webpack/lib/dependencies/NullDependencyTemplate
  • webpack/lib/dependencies/PrefetchDependency
  • webpack/lib/dependencies/RequireContextDependency
  • webpack/lib/dependencies/RequireContextPlugin
  • webpack/lib/dependencies/RequireEnsureDependenciesBlock
  • webpack/lib/dependencies/RequireEnsureDependency
  • webpack/lib/dependencies/RequireEnsureItemDependency
  • webpack/lib/dependencies/RequireIncludeDependency
  • webpack/lib/dependencies/RequireResolveContextDependency
  • webpack/lib/dependencies/RequireResolveDependency
  • webpack/lib/dependencies/RequireResolveHeaderDependency
  • webpack/lib/dependencies/SingleEntryDependency
  • webpack/lib/dependencies/TemplateArgumentDependency
  • webpack/lib/node/NodeEnvironmentPlugin
  • webpack/lib/node/NodeOutputFileSystem
  • webpack/lib/node/NodeSourcePlugin
  • webpack/lib/node/NodeTargetPlugin
  • webpack/lib/node/NodeTemplatePlugin
  • webpack/lib/node/NodeWatchFileSystem
  • webpack/lib/optimize/DedupePlugin
  • webpack/lib/optimize/FlagIncludedChunksPlugin
  • webpack/lib/optimize/LimitChunkCountPlugin
  • webpack/lib/optimize/MinChunkSizePlugin
  • webpack/lib/optimize/OccurenceOrderPlugin
  • webpack/lib/optimize/UglifyJsPlugin
  • webpack/lib/webpack
  • webpack/lib/webpack.js
  • webpack/lib/webworker/WebWorkerTemplatePlugin
  • webpack/package
  • webpack/package.json

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (webpack) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

webpack

NPM version Stories in Ready

documentation

Introduction

webpack is a bundler for modules. The main purpose is to bundle javascript files for usage in browser.

TL;DR

  • bundles CommonJs, AMD and/or Labeled Modules modules. (even combined)
  • can create a single bundle or a bunch of chunks loaded on demand, to reduce initial loading time.
  • dependencies are resolved while compiling, this makes the runtime very small
  • loader can preprocess files while compiling, i. e. coffee-script to javascript

Check the documentation if you want to know more...

Examples

Take a look at the examples folder.

Features

A small example what's possible

var commonjs = require("./commonjs");
require: "./labeled";
define(["amd-module", "./file"], function(amdModule, file) {
    require(["big-module/big/file"], function(big) {
        // AMD require acts as split point
        // and "big-module/big/file" is only downloaded when requested
        var stuff = require("../my/stuff");
        // dependencies automatically goes in chunk too
    });
});

require("coffee!./cup.coffee");
// The loader syntax allows to proprocess files
// for common stuff you can bind RegExps to loaders
// if you also add ".coffee" to the default extensions
// you can write:
require("./cup");

function loadTemplate(name) {
    return require("./templates/" + name ".jade");
    // dynamic requires are supported
    // while compiling we figure out what can be requested
    // here everything in "./templates" that matches /^.*\.jade$/
    // (can also be in subdirectories)
}

require("imports?_=underscore!../loaders/my-ejs-loader!./template.html");
// you can chain loaders
// you can configure loaders with query parameters
// and loaders resolve similar to modules

// ...you can combine everything
function loadTemplateAsync(name, callback) {
    require(["bundle?lazy!./templates/" + name + ".jade"], function(templateBundle) {
        templateBundle(callback);
    });
}

Documentation

documentation

Tests

You can run the unit tests with npm test. build status

You can run the browser tests:

cd test/browsertests
node build

and open tests.html in browser.

Contribution

You are welcome to contribute by writing issues or pull requests. It would be nice if you open source your own loaders or webmodules. :)

You are also welcome to correct any spelling mistakes or any language issues, because my english is not perfect...

License

Copyright (c) 2012-2013 Tobias Koppers

MIT (http://www.opensource.org/licenses/mit-license.php)

Dependencies

Dependency Status