Skip to content

repairearth/dynamic-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dynamic loader for webpack

dynamic loader module for webpack

Usage

// The chunk is requested, when you require the bundle
var component = 'home/index.rcx'; // react-router component
var waitForChunk = require('dynamic?ext=rcx!./app/' + component);

// To wait until the chunk is available (and get the exports)
//  you need to async wait for it.
waitForChunk(function(file) {
	// use file like is was required with
	// var file = require("./file.js");
});
// wraps the require in a require.ensure block

About

dynamic loader module for webpack

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published