This repository was archived by the owner on Aug 18, 2022. It is now read-only.
forked from agneym/neeto-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
62 lines (61 loc) · 1.32 KB
/
webpack.config.js
File metadata and controls
62 lines (61 loc) · 1.32 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
const PeerDepsExternalsPlugin = require("@bigbinary/peer-deps-externals-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const path = require("path");
module.exports = {
entry: {
index: "./lib/components/index.js",
layouts: "./lib/components/layouts/index.js",
formik: "./lib/components/formik/index.js",
},
plugins: [new MiniCssExtractPlugin(), new PeerDepsExternalsPlugin()],
module: {
rules: [
{
test: /\.md$/i,
use: "raw-loader",
},
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
include: [path.resolve(__dirname, "lib")],
use: [
{
loader: "babel-loader",
},
],
},
{
test: /\.html$/,
use: [
{
loader: "html-loader",
},
],
},
{
test: /\.(png|jpe?g|gif|svg)$/i,
use: [
{
loader: "file-loader",
},
],
},
{
test: /\.s[ac]ss$/i,
use: [
MiniCssExtractPlugin.loader,
"css-loader",
"postcss-loader",
"sass-loader",
],
},
],
},
output: {
publicPath: "",
path: __dirname,
filename: "[name].js",
library: "neetoui",
libraryTarget: "umd",
},
};