c2-routable-tabs
Version:
Routable bootstrap tabs
48 lines (44 loc) • 961 B
JavaScript
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const CleanWebpackPlugin = require('clean-webpack-plugin')
let config = {
entry: {
app: [
'babel-polyfill',
'./src/index.js'
]
},
devtool: 'inline-source-map',
devServer: {
contentBase: './dist'
},
plugins: [
new CleanWebpackPlugin(['dist']),
new HtmlWebpackPlugin({
template: './src/index.ejs'
})
],
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist')
},
resolve: {
alias: {
'c2-routable-tabs': path.join(__dirname, '../src')
}
},
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: { loader: 'babel-loader' }
}
]
}
}
if (process.env.NODE_ENV === 'production') {
config.output.path = path.join(__dirname, '../docs')
config.output.publicPath = './'
}
module.exports = config