launchcodedev / app-config-plugin

Webpack plugin for loading app-config files

Home Page:https://github.com/servall/app-config

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NOTE: This package is now replaced by @lcdev/app-config-webpack-plugin. This package will not support v2.


App Config Webpack Plugin

Licensed under MPL 2.0 Build Status npm

import AppConfigPlugin, { regex, loader } from '@lcdev/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,
        },
      },
    },
  ],
},

About

Webpack plugin for loading app-config files

https://github.com/servall/app-config

License:Mozilla Public License 2.0


Languages

Language:TypeScript 99.0%Language:JavaScript 1.0%