forked from Automattic/simplenote-electron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
38 lines (37 loc) · 1003 Bytes
/
webpack.config.js
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
34
35
36
37
38
const autoprefixer = require( 'autoprefixer' );
const AppCachePlugin = require( 'appcache-webpack-plugin' );
const HtmlWebpackPlugin = require( 'html-webpack-plugin' );
module.exports = {
context: __dirname + '/lib',
devtool: 'sourcemap',
entry: [
'./boot'
],
output: {
path: __dirname + '/dist',
filename: 'app.js'
},
module: {
preLoaders: [
{ test: /\.jsx?$/, exclude: /node_modules|lib\/simperium/, loaders: [ 'eslint-loader' ] }
],
loaders: [
{ test: /\.jsx?$/, exclude: /node_modules/, loaders: [ 'babel' ] },
{ test: /\.json$/, loader: 'json-loader'},
{ test: /\.scss$/, loader: 'style-loader!css-loader!postcss-loader!sass-loader'}
]
},
resolve: {
extensions: ['', '.js', '.jsx', '.json', '.scss', '.css' ],
moduleDirectories: [ 'lib', 'node_modules' ]
},
plugins: [
new AppCachePlugin(),
new HtmlWebpackPlugin( {
title: 'Simplenote',
templateContent: require( './index-builder.js' ),
inject: false
} )
],
postcss: [ autoprefixer() ]
};