@servall/app-config-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

App Config Webpack Plugin

import AppConfigPlugin, { regex, loader } from '@servall/app-config-plugin';

// in your plugins:
plugins: [
  new AppConfigPlugin(),
]

// in your loaders:
module: {
  rules: [
    { test: regex, use: { loader } },
  ],
},

Need window injection support?

plugins: [
  // this injects the configuration into <head> at build time
  new AppConfigPlugin({ headerInjection: true }),
]

module: {
  rules: [
    {
      test: regex,
      use: {
        loader,
        options: {
          // this reads the configuration from <head> instead of injecting it at build time
          headerInjection: true,
        },
      },
    },
  ],
},

Readme

Keywords

none

Package Sidebar

Install

npm i @servall/app-config-plugin

Weekly Downloads

0

Version

0.3.0

License

MPL-2.0

Unpacked Size

260 kB

Total Files

12

Last publish

Collaborators

  • jbrandtlc
  • servalldev
  • joelgallant-me
  • gregnr