multi-entry-plugin

0.0.3 • Public • Published

multi-entry-plugin

set webpack multiple entry by single entry.

Install

    npm i multi-entry-plugin --save-dev

Example

src:

   ├── src                            
   |   ├── public                     
   |   |   ├── index.js        
   |   ├── page                      
   |   |   ├── index.js                  
   |   └── index.js                    

webpack.config.js:

    import MultiEntryPlugin from 'multi-entry-plugin';
 
    const config = {
      entry: {
        'app': './src/index.js'
      },
      // ...
      plugins: [
            new MultiEntryPlugin({
              // plugin will depend the directory of 'mainEntry' to set multiple entry.
              mainEntry: 'app',
              exclude: ['util/**/*.js']
            })
        ]
    }

dist:

   ├── dist                            
   |   ├── public                     
   |   |   ├── index.js        
   |   ├── page                      
   |   |   ├── index.js                  
   |   └── index.js                    

Readme

Keywords

Package Sidebar

Install

npm i multi-entry-plugin

Weekly Downloads

6

Version

0.0.3

License

ISC

Unpacked Size

3.96 kB

Total Files

3

Last publish

Collaborators

  • ksora