-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.appData.js
37 lines (36 loc) · 977 Bytes
/
webpack.appData.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
33
34
35
36
37
// @ts-nocheck
/* eslint-disable import/no-extraneous-dependencies */
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path')
/**
* Transpile Typescript file with initial Props so
* we can import and inject these data during local development via
* HtmlWebpackPlugin into the index.html file
*/
module.exports = {
mode: 'production',
entry: './server/appData/index.ts',
output: {
path: path.resolve(__dirname, 'assets/local'),
filename: 'appData.js',
library: 'beta',
libraryTarget: 'umd',
globalObject: "typeof self !== 'undefined' ? self : this",
},
resolve: {
extensions: ['.ts', '.tsx', '.js'],
},
module: {
rules: [
{
test: [/\.(j|t)sx?$/],
loader: 'awesome-typescript-loader',
exclude: [
path.resolve(__dirname, 'node_modules/'),
path.resolve(__dirname, 'tests/'),
path.resolve(__dirname, 'assets/'),
],
},
],
},
}