forked from babakhani/pwt.datepicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.dev.js
43 lines (43 loc) · 1.15 KB
/
webpack.config.dev.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
// https://webpack.js.org/configuration/
let webpack = require('webpack'),
path = require('path'),
pkg = require("./package.json"),
fileName = pkg.name + ".js",
plugins = [
new webpack.DefinePlugin({
__VERSION__: JSON.stringify(pkg.version)
})
];
module.exports = {
entry: "./src/es6/index.js", // string | object | array
output: {
library: "persianDatepicker",
libraryTarget: "umd2",
path: path.resolve(__dirname, "dist/js"), // string
filename: fileName // string
},
devServer: {
contentBase: path.join(__dirname, "/"),
port: 3000
},
module: {
rules: [
{
test: /\.js$/,
include: [
path.resolve(__dirname, "./src/es6")
],
exclude: [
path.resolve(__dirname, "./node_module")
],
use: {
loader: 'babel-loader',
options: {
presets: ['es2015']
}
}
}
]
},
plugins: plugins
}