-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
57 lines (56 loc) · 1.48 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
50
51
52
53
54
55
56
57
var webpack = require("webpack");
var path = require("path");
var webpackUglifyJsPlugin = require('webpack-uglify-js-plugin');
var LiveReloadPlugin = require('webpack-livereload-plugin');
module.exports = {
entry: "./dev/app.js",
output: {
path: __dirname + '/public/js',
publicPath: "./public/",
filename: "app.js",
sourceMapFilename: "app.js.map"
},
module: {
loaders: [
{
test : /\.jsx/,
// include : APP_DIR,
loader : 'babel'
},
{test: /\.js$/, exclude: /node_modules/, loader: "babel-loader"},
{test: /\.vue/, loader: "vue-loader"},
{test: /\.css$/, loader: "style!css"},
{test: /\.html$/, loader: "html-loader"},
{test: /\.jpg$/, loader: "file-loader"},
{test: /\.png$/, loader: "url-loader?mimetype=image/png"},
{test: /\.(woff|woff2)$/, loader: "url-loader?limit=10000&mimetype=application/font-woff"},
{test: /\.ttf$/, loader: "file-loader"},
{test: /\.eot$/, loader: "file-loader"},
{test: /\.svg$/, loader: "file-loader"}
]
},
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery"
}),
/* new webpackUglifyJsPlugin({
cacheFolder: path.resolve(__dirname, 'public/cached_uglify/'),
debug: true,
minimize: true,
sourceMap: true,
output: {
comments: false
},
compressor: {
warnings: false
}
}),*/
new LiveReloadPlugin()
],
devtool: "source-map",
devServer: {
inline: true,
port: 3000
}
};