forked from miaolz123/vue-markdown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.common.js
40 lines (39 loc) · 970 Bytes
/
webpack.common.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
const webpack = require("webpack");
const path = require('path');
const version = require("./package.json").version;
const banner =
"/**\n" +
" * vue-markdown-v3 v" + version + "\n" +
" * https://github.com/princeahugah/vue-markdown-v3\n" +
" * MIT License\n" +
" */\n";
module.exports = {
mode: 'production',
entry: "./src/VueMarkdown.js",
target: "node",
output: {
path: path.resolve(__dirname, 'dist'),
filename: "vue-markdown-v3.common.js",
library: {
name: 'VueMarkdown',
type: 'umd',
},
},
devtool: process.env.NODE_ENV === 'development' ? 'source-map' : 'hidden-source-map',
plugins: [
new webpack.BannerPlugin(banner, { raw: true })
],
module: {
rules: [{
test: /\.vue$/,
loader: "vue-loader"
}, {
test: /\.js$/,
loader: "babel-loader",
exclude: /node_modules/
}, {
test: /\.css$/,
use: ['style-loader', 'css-loader'],
}]
},
}