Skip to content

WEBuster/index-file-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'
      ])
    ]
  }
}

About

A webpack resolver plugin to specify directory index file.

Resources

License

Stars

Watchers

Forks

Packages

No packages published