-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
65 lines (63 loc) · 1.93 KB
/
webpack.config.js
File metadata and controls
65 lines (63 loc) · 1.93 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
'use strict';
var webpack = require("webpack");
// var DashboardPlugin = require('webpack-dashboard/plugin');
var path = require("path");
module.exports = {
// ビルドの基点となるファイル
entry: {
// 'index': path.join(__dirname, '/webpack/Index/index.js'),
'admin': path.join(__dirname, '/webpack/Admin/index.js'),
},
// ビルド後のファイル
output: {
path: path.join(__dirname, "/client/dist"),
filename: '[name].bundle.js',
publicPath: "/dist/"
},
cache: true,
// devtool: "source-map",
devtool: 'cheap-module-eval-source-map',
// devtool: false,
// 拡張子が.jsのファイルはbabel-loaderを通してビルド(node_modulesは除外)
module: {
loaders: [{
test: /\.js$/,
exclude: /node_modules/,
loaders: ['ng-annotate-loader', 'babel-loader']
}, {
test: /\.html$/,
loaders: ['raw-loader', 'html-minify-loader']
},
{
test: /\.css$/,
loaders: ['style-loader', 'css-loader?modules'],
},
// {
// //bootstrap font
// test: /\.woff2?$|\.ttf$|\.eot$|\.svg$/,
// loader: 'url-loader?mimetype=image/svg+xml&name=[path][name].[ext]'
// },
{
//bootstrap font
test: /\.woff2?$|\.ttf$|\.eot$|\.svg$/,
loader: 'file-loader?name=[name].[ext]'
},
{
test: /\.scss$/,
loaders: ['style-loader', 'css-loader', 'sass-loader']
}]
},
plugins: [
// new DashboardPlugin(),
// new webpack.optimize.UglifyJsPlugin({
// sourceMap: false,
// minimize: true,
// warnings: false,
// compress: {
// drop_debugger: true,
// warnings: false,
// drop_console: true
// }
// })
]
};