@sincronia/webpack-plugin
Webpack plugin for Sincronia
Last updated 6 months ago by bbarber9 .
GPL-3.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @sincronia/webpack-plugin 
SYNC missed versions from official npm registry.

@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

Key Type Default Description
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
webpackConfig webpack.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
        }
      }
    ]
  }
};

Current Tags

  • 0.3.1                                ...           latest (6 months ago)

12 Versions

  • 0.3.1                                ...           6 months ago
  • 0.3.0                                ...           6 months ago
  • 0.2.5                                ...           8 months ago
  • 0.2.2                                ...           8 months ago
  • 0.2.1                                ...           9 months ago
  • 0.2.0                                ...           9 months ago
  • 0.1.1                                ...           9 months ago
  • 0.1.0                                ...           9 months ago
  • 0.0.5                                ...           9 months ago
  • 0.0.4                                ...           9 months ago
  • 0.0.3                                ...           9 months ago
  • 0.0.2                                ...           9 months ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |