Skip to content

Latest commit

 

History

History
executable file
·
61 lines (48 loc) · 1.13 KB

README.md

File metadata and controls

executable file
·
61 lines (48 loc) · 1.13 KB

ceri-webpack

Configure your ceri components in a single place. Webpack only.

Features

Install

npm install --save-dev ceri-webpack

webpack.config

module.exports = async function() {
  return {
    plugins: [
      // available options
      // name (String) Default:"ceri.config" Name of the configuration file
      // config (Object) Overwrites configuration file
      await require("ceri-webpack")(options)
    ]
  }
}

ceri.config

Read by read-conf, from ./ or ./build/ by default.

module.exports = {
  // …

  // Ceri plugins to load
  plugins: [], // Array

  // Name of the custom elements polyfill to load
  // types: [String, Boolean]
  polyfill: "document-register-element",

  // …

}

In your webpack entry file

// with polyfill
require("ceri-webpack").then(function(){
  // everything is ready
})
// without polyfill
require("ceri-webpack")
// everything is ready

License

Copyright (c) 2017 Paul Pflugradt Licensed under the MIT license.