Skip to content

Add the possibility to ignore local dependencies in factorization process #78

@PaGury

Description

@PaGury

Hi,

It is possible to ignore some dependencies in the factorization process ?

I have 3 files

page1.js

var domready = require('domready');
var React = require('react/addons');
var localScript = require('./common/localScript');

domready(function() {
    // stuff
});

page2.js

var React = require('react/addons');
var localScript = require('./common/localScript');

domready(function() {
    // stuff
});

page3.js

var domready = require('domready');
var localScript2 = require('./common/localScript2');

domready(function() {
    // stuff
});

It would be great if we were able to configure factor-bundle to export domready and react/addons (node_modules dependencies) in a 'common-bundle.js' file. And able to ignore the 'localScript' for each files (maybe based on a regex, or a parameter 'ignoreLocalsDependencies').

Why ?

The export of common node_modules dependencies is pretty nice and usefull, but i do not want to export these locals dependencies in the common-bundle file. These locals would be used only in a few scripts and it's unnecessary to factorize. Unlike the node_modules dependencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions