-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.production.config.js
More file actions
37 lines (34 loc) · 1.39 KB
/
webpack.production.config.js
File metadata and controls
37 lines (34 loc) · 1.39 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
"use strict";
const Webpack = require("webpack")
, ExtractTextPlugin = require("extract-text-webpack-plugin");
const config = {
entry: "./src/web-src/index.js",
output: {
path: "./src/public/build",
filename: "bundle.js",
publicPath: "/static/build/"
},
//devtool: "source-map",
module: {
loaders: [
{ test: /\.vue$/, loader: "vue" },
{ test: /\.js$/, exclude: /node_modules/, loader: "babel" },
{ test: /\.css$/, loader: ExtractTextPlugin.extract("style-loader", "css-loader") },
// https://gist.github.com/Turbo87/e8e941e68308d3b40ef6 - font awesome font loading
{ test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/font-woff" },
{ test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/font-woff" },
{ test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/octet-stream" },
{ test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: "file" },
{ test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=image/svg+xml" }
]
},
plugins: [
new Webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery",
IScroll: "iscroll"
}),
new ExtractTextPlugin("bundle.css")
]
};
module.exports = config;