Skip to content

Latest commit

 

History

History
43 lines (36 loc) · 488 Bytes

README.md

File metadata and controls

43 lines (36 loc) · 488 Bytes

php-config-loader

php config loader for webpack

Usage

config.php

<?php

return [
    [
        'value' => 'foo',
        'label' => 'Foo label'
    ],
    [
        'value' => 'bar',
        'label' => 'Bar label'
    ]
];

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.php?$/,
        use: [
          {
            loader: 'php-config-loader'
          },
        ]
      },
      ...
    ],
  },
  ...
};