-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
49 lines (46 loc) · 1.34 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
45
46
47
48
49
var webpack = require("webpack");
var CopyWebpackPlugin = require('copy-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var path = require('path')
var config = {
entry: "./src/angular-uikit.js",
output: {
path: path.join(__dirname, 'dist'),
filename: "angular-uikit.min.js"
},
devtool: "cheap-module-source-map",
devServer: {
inline: true,
contentBase: "./dist",
port: 8200
},
module: {
rules: [
{
test: /\.js$/,
use: ['ng-annotate-loader', 'babel-loader?presets[]=es2015'],
exclude: /node_modules/
},
{
test: /\.(eot|svg|ttf|woff|woff2|jpg|png|json)$/,
use: 'file-loader?name=[path][name].[ext]?[hash]'
},
{
test: /\.(scss|css)$/,
use: ExtractTextPlugin.extract({
fallbackLoader: "style-loader",
loader: "css-loader?minimize=true!sass-loader"
})
}]
},
plugins: [
new ExtractTextPlugin("angular-uikit.min.css"),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
},
comments: false
})
]
};
module.exports = config;