forked from marmelab/ng-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
44 lines (43 loc) · 1.33 KB
/
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
39
40
41
42
43
44
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: {
'ng-admin': [
__dirname + '/src/javascripts/ng-admin.js',
__dirname + '/src/sass/ng-admin.scss',
],
},
output: process.env.NODE_ENV === 'test' ? {
path: './src/javascripts/test/fixtures/examples/blog/',
filename: "build/[name].min.js"
} : {
publicPath: "http://localhost:8000/",
filename: "build/[name].min.js"
},
module: {
loaders: [
{ test: /\.js/, loaders: ['babel'], include: __dirname + '/src/javascripts' },
{ test: /\/angular\.min\.js$/, loader: 'exports?angular' },
{ test: /\.html$/, loader: 'html' },
{ test: /\.(woff2?|svg|ttf|eot)(\?.*)?$/, loader: 'url' },
{ test: /\.css$/, loader: ExtractTextPlugin.extract('css') },
{ test: /\.scss$/, loader: ExtractTextPlugin.extract('css!sass') }
]
},
resolve: {
alias: {
angular: __dirname + '/node_modules/angular/angular.min.js',
},
},
plugins: [
new ExtractTextPlugin('build/[name].min.css', {
allChunks: true
})
],
stats: {
children: false,
hash: false,
version: false,
warnings: false,
errorDetails: true,
}
};