0.4.2-alpha.3 • Published 3 years ago

@sincronia/webpack-plugin v0.4.2-alpha.3

Weekly downloads
62
License
GPL-3.0
Repository
github
Last release
3 years ago

@sincronia/webpack-plugin

Overview

This plugin allows you to run Webpack on your desired files. This allows you to build frontend bundles in a more modern way or even potentially bundle server side javascript files.

Installation

npm i -D @sincronia/webpack-plugin

Options

KeyTypeDefaultDescription
configGenerator(context:Sinc.FileContext)=>webpack.Configuration()=>{}Function that can generate a webpack configuration object. A Sinc.FileContext is passed in so that you can substitute options using the context
webpackConfigwebpack.Configuration{}Same as webpack.config.js object

Order of Configurations

  1. Load from closest webpack.config.js.
  2. Load from webpackConfig in sinc.config.js and override any overlapping values.
  3. Run configGenerator() from configGenerator option in sinc.config.js and override any overlapping values.

Example Usage

This example takes .wp.js files and bundles them with webpack by generating the options with a function

//sinc.config.js
module.exports={
  rules:{
    match:/\.wp\.js$/,
    plugins:[
      name:"@sincronia/webpack-plugin",
      options:{
        configGenerator:(context)=>{
          mode:"production",
          //set name of record as the library name
          library:context.name
        }
      }
    ]
  }
};
0.4.2-alpha.3

3 years ago

0.4.2-alpha.2

3 years ago

0.4.2-alpha.0

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.10-alpha.2

4 years ago

0.3.10-alpha.1

4 years ago

0.3.10-alpha.0

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.5

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago