-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathplugin.config.js
More file actions
70 lines (68 loc) · 2 KB
/
plugin.config.js
File metadata and controls
70 lines (68 loc) · 2 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
63
64
65
66
67
68
69
70
/******************************************************************************
*
* Copyright (c) 2018, the Perspective Authors.
*
* This file is part of the Perspective library, distributed under the terms of
* the Apache License 2.0. The full license can be found in the LICENSE file.
*
*/
const path = require("path");
const PerspectivePlugin = require("@finos/perspective-webpack-plugin");
module.exports = {
mode: process.env.PSP_NO_MINIFY || process.env.PSP_DEBUG ? "development" : process.env.NODE_ENV || "production",
entry: {
index: "./src/ts/index.ts"
},
resolve: {
extensions: [".ts", ".js"],
fallback: {
path: false,
fs: false,
crypto: false
}
},
plugins: [new PerspectivePlugin({inline: true})],
performance: {
hints: false,
maxEntrypointSize: 512000,
maxAssetSize: 512000
},
externals: [/\@jupyter|\@lumino/],
stats: {modules: false, hash: false, version: false, builtAt: false, entrypoints: false},
module: {
rules: [
{
test: /\.less$/,
exclude: /node_modules/,
use: [{loader: "style-loader"}, {loader: "css-loader"}, {loader: "less-loader"}]
},
{
test: /\.css$/,
exclude: /node_modules/,
use: [{loader: "css-loader"}]
},
{
test: /\.(html)$/,
exclude: /node_modules/,
use: {
loader: "html-loader",
options: {}
}
},
{
test: /\.ts$/,
exclude: /node_modules/,
loader: "ts-loader"
}
]
},
externalsPresets: {web: false, webAsync: true},
output: {
filename: "[name].js",
library: {
type: "umd"
},
publicPath: "",
path: path.resolve(__dirname, "../../dist")
}
};