index-file-webpack-plugin

0.2.2 • Public • Published

index-file-webpack-plugin

Build Status Version License

A webpack resolver plugin to specify directory index file.

Install

npm i -D index-file-webpack-plugin

webpack config

var IndexFilePlugin = require('index-file-webpack-plugin')
var webpack = require('webpack')
{
  plugins: [
    new webpack.ResolverPlugin([
      new IndexFilePlugin([
        '[name].js',  // '[name]' is directory name.
        'main.js',
        'index.js'
      ])
    ])
  ]
}

webpack2 config

var IndexFilePlugin = require('index-file-webpack-plugin')
var webpack = require('webpack')
{
  resolve: {
    plugins: [
      new IndexFilePlugin([
        '[name].js',  // '[name]' is directory name.
        'main.js',
        'index.js'
      ])
    ]
  }
}

Readme

Keywords

Package Sidebar

Install

npm i index-file-webpack-plugin

Weekly Downloads

1

Version

0.2.2

License

MIT

Last publish

Collaborators

  • webuster