-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwebpack.config.babel.js
More file actions
33 lines (30 loc) · 934 Bytes
/
Copy pathwebpack.config.babel.js
File metadata and controls
33 lines (30 loc) · 934 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import webpack from 'webpack'
import path from 'path'
import HtmlWebpackPlugin from 'html-webpack-plugin'
const entryPoint = path.resolve(__dirname, 'docs/app/index.js')
const webpackConfig = {
entry: {
'fuego.min': entryPoint
},
devtool: 'source-map',
output: {
path: path.resolve(__dirname, 'docs'),
filename: 'build/[name].[hash].js',
library: ['Fuego']
},
module: {
loaders: [
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' },
{ test: /\.md/, exclude: /node_modules/, loader: 'raw-loader' },
]
},
plugins: [
// Only minifiy files already marked for it
new webpack.optimize.UglifyJsPlugin({ include: /\.min\.js$/, compress: true, comments: false }),
new HtmlWebpackPlugin({
chunks: ['fuego.min'],
template: 'docs/index.ejs', // Load a custom template (ejs by default see the FAQ for details)
})
]
}
export default webpackConfig