unbroken-dome / indexhtml-webpack-plugin

Index HTML plugin for Webpack
MIT License
42 stars 5 forks source link

Possible to not keep an intermediate index.html.js file? #12

Closed F21 closed 1 year ago

F21 commented 8 years ago

I have the following in my webpack config:

var plugins = require('webpack-load-plugins')();
var webpack = require('webpack')

module.exports = {

    devtool: 'inline-source-map',

    entry: {
        'index.html': './html/index.html',
        'app': './js/app.js'
    },

    output: {
        path: __dirname + '/build',
        filename: '[name].[chunkhash].js',
        chunkFilename: '[name].[chunkhash].js',
        publicPath: '/build/'
    },

    module: {
        loaders: [
            { test: /\.js$/, exclude: /node_modules/, loader: 'babel' },
            { test: /\.css$/, loader: 'style!css' },
            { test: /index\.html$/, loader: 'html'},
        ]
    },

    plugins: [
        new webpack.optimize.CommonsChunkPlugin({name: "lib", filename: "[name].[chunkhash].js"}),
        new webpack.optimize.OccurrenceOrderPlugin(true),
        new webpack.DefinePlugin({
            'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development')
        }),
        new plugins.indexhtml('index.html', 'index.html')
    ]
};

This generates a build of index.html which I need, but it also builds a index.html.2de9e7bb95d30842f334.js.

Is there anyway to to have the index.html.*.js file included?