wildcards-entry-webpack-plugin icon indicating copy to clipboard operation
wildcards-entry-webpack-plugin copied to clipboard

Allow multiple entry points

Open rickardliljeberg opened this issue 6 years ago • 1 comments

I would love something like this

entry: WildcardsEntryWebpackPlugin.entry({ entry1: './src/a.js', entry2: './src/**/*.js', entry3: '...' }),

rickardliljeberg avatar Mar 06 '18 19:03 rickardliljeberg

I suppose you may use second parameter to extend list of entries if you need non-wildcard values:

{
    …
    entry: WildcardsEntryWebpackPlugin.entry('./src/**/*.js', {staticEntry: './src/a.js'}),
    …
}

or something like this for several wildcards:

{
    …
    entry: () => {
        return Object.assign({},
            WildcardsEntryWebpackPlugin.entry('./sources/**/index.jsx')(),
            WildcardsEntryWebpackPlugin.entry('./sources/libs/**/index.js', {}, 'libs')(),
            WildcardsEntryWebpackPlugin.entry('./sources/utils/**/*.js', {}, 'utils')(),
        );
    },
    …
}

But I would also prefer this as an option of plugin ;)

aahz avatar Jul 05 '18 14:07 aahz