-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathownable-js.webpack.js
More file actions
41 lines (39 loc) · 878 Bytes
/
ownable-js.webpack.js
File metadata and controls
41 lines (39 loc) · 878 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
39
40
41
// This configuration is to build `ownable.js`, which is the js file that's
// loaded in each Ownable iframe.
//
// Webpack for the React App is controlled by the `react-script` library. To
// customize it, see `craco.config.js`.
//
const path = require("path");
module.exports = {
mode: "production",
entry: "./src/ownable.ts",
devtool: "source-map",
output: {
path: path.resolve(__dirname, "public"),
filename: "ownable.js",
asyncChunks: false,
library: {
type: "global"
}
},
module: {
rules: [
{
test: /\.ts?$/,
loader: require.resolve('babel-loader'),
options: {
presets: ["@babel/preset-typescript"],
},
sideEffects: false
},
]
},
resolve: {
extensions: [".ts", ".js"]
},
performance: {
maxEntrypointSize: 512000,
maxAssetSize: 512000
},
};