forked from typesense/typesense-instantsearch-adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
32 lines (29 loc) · 866 Bytes
/
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
const path = require("path");
const clonedeep = require("lodash.clonedeep");
const minifiedConfiguration = {
entry: path.resolve(__dirname, "./src/TypesenseInstantsearchAdapter"),
mode: "production",
devtool: "source-map",
output: {
path: path.resolve(__dirname, "./dist"),
filename: "typesense-instantsearch-adapter.min.js",
library: {
name: "TypesenseInstantSearchAdapter",
type: "umd",
export: "default",
},
},
module: {
rules: [
{
test: /\.(js)$/,
exclude: /node_modules/,
use: ["babel-loader"],
},
],
},
};
const unminifiedConfiguration = clonedeep(minifiedConfiguration);
unminifiedConfiguration.mode = "development";
unminifiedConfiguration.output.filename = "typesense-instantsearch-adapter.js";
module.exports = [minifiedConfiguration, unminifiedConfiguration];