forked from PeakTai/vue-html5-editor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
40 lines (40 loc) · 1.19 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
var path = require("path")
var package = require("./package.json")
var webpack = require("webpack")
module.exports = {
context: __dirname + "/src",
entry: "./index.js",
output: {
path: __dirname + "/dist",
filename: "vue-html5-editor.js",
libraryTarget: "umd",
library: "VueHtml5Editor"
},
module: {
loaders: [
{test: /\.css$/, loader: "style-loader!css-loader"},
{test: /(\.html)$/, loader: "html-loader"},
{test: /\.(jpg)|(png)|(gif)$/, loader: "url-loader"},
{test: /\.vue$/, loader: "vue-loader"},
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel'
}
]
},
plugins: [
new webpack.BannerPlugin("Vue-html5-editor " + package.version + "\nhttps://github.com/PeakTai/vue-html5-editor"),
new webpack.DefinePlugin({
ROOT: JSON.stringify(path.normalize(__dirname)),
}),
new webpack.DefinePlugin({
VERSION: JSON.stringify(package.version),
})
],
debug: false,
babel: {
presets: ['es2015'],
plugins: ['transform-runtime']
}
}