-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathplugin.config.js
More file actions
63 lines (61 loc) · 1.91 KB
/
plugin.config.js
File metadata and controls
63 lines (61 loc) · 1.91 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
/******************************************************************************
*
* 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");
const webpack = require("webpack");
module.exports = {
mode: process.env.PSP_NO_MINIFY || process.env.PSP_DEBUG ? "development" : process.env.NODE_ENV || "production",
entry: {
index: "./src/ts/index.ts"
},
devtool: "cheap-eval-source-map",
resolveLoader: {
alias: {
"file-worker-loader": "@finos/perspective-webpack-plugin/src/js/psp-worker-loader.js"
}
},
resolve: {
extensions: [".ts", ".js"]
},
performance: {
hints: false,
maxEntrypointSize: 512000,
maxAssetSize: 512000
},
externals: /\@jupyterlab|\@phosphor|\@jupyter-widgets/,
stats: {modules: false, hash: false, version: false, builtAt: false, entrypoints: false},
plugins: [new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /(en|es|fr)$/), new PerspectivePlugin()],
module: {
rules: [
{
test: /\.css$/,
exclude: /node_modules/,
use: [{loader: "css-loader"}]
},
{
test: /\.(wasm)$/,
type: "javascript/auto",
use: {
loader: "arraybuffer-loader",
options: {}
}
},
{
test: /\.ts$/,
exclude: /node_modules/,
loader: "ts-loader"
}
]
},
output: {
filename: "[name].js",
libraryTarget: "umd",
path: path.resolve(__dirname, "../../dist")
}
};