1.0.4 • Published 9 years ago

require-ensure-shim v1.0.4

Weekly downloads
611
License
ISC
Repository
github
Last release
9 years ago

Why this shim?

If you use webpacks code splitting feature with shared javascript modules that you want to use server side with node.js, you need to shim this function to require your modules properly.

How to use

Put the following code in every file you define a split point with require.ensure. It is important that you first shim and then define the split point.

    require('require-ensure-shim').shim(require);

    require.ensure(['./module1'], function(require){

        var module1 = require('./module1');
        module1();
    });
1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago