forked from osano/cookieconsent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.common.js
More file actions
38 lines (37 loc) · 934 Bytes
/
webpack.common.js
File metadata and controls
38 lines (37 loc) · 934 Bytes
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
"use strict";
const join = require("path").join;
module.exports = {
entry: join(__dirname, "src", "index.js"),
output: {
path: join(__dirname, "dist/umd"),
filename: "index.js",
libraryExport: "default",
libraryTarget: "umd",
library: "CookieConsent",
},
optimization: {
// Even in production, export clean output. Expect users to minify as needed with their own bundler
minimize: false,
},
module: {
rules: [
{
test: /\.js?$/,
loader: "babel-loader",
options: {
root: __dirname,
rootMode: "upward-optional",
},
},
{
test: /\.scss?$/,
use: [
"style-loader", // creates style nodes from JS strings
"css-loader", // translates CSS into CommonJS
"sass-loader", // compiles Sass to CSS, using Node Sass by default
"postcss-loader",
],
},
],
},
};