-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
36 lines (34 loc) · 1.05 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
const path = require("path");
const ExtractTextPlugin = require("mini-css-extract-plugin");
const autoprefixer = require("autoprefixer");
var exclusionRegexs = [/node_modules/];
module.exports = {
context: __dirname,
devtool: "source-map",
entry: {
"datepicker.js": path.resolve(__dirname, "./src/index.js"),
"datepicker.css": path.resolve(__dirname, "./src/datepicker.scss"),
},
output: {
path: path.resolve(__dirname, "./dist"),
filename: "[name]",
library: "bootstrapDatepicker",
libraryTarget: "umd",
},
module: {
rules: [
{ test: /\.html$/, exclude: /node_modules/, use: ["raw-loader"] },
{
test: /\.scss$/,
use: [
ExtractTextPlugin.loader,
"css-loader",
"resolve-url-loader",
"postcss-loader",
"sass-loader",
],
},
],
},
plugins: [new ExtractTextPlugin({ filename: "./style.css" })],
};