generated from jim60105/worker-ts_template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
44 lines (42 loc) · 1.07 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
const path = require('path')
const webpack = require('webpack')
const mode = process.env.NODE_ENV || 'production'
module.exports = {
output: {
filename: `worker.${mode}.js`,
path: path.join(__dirname, 'dist'),
},
mode,
resolve: {
extensions: ['.ts', '.tsx', '.js'],
plugins: [],
},
plugins: [
new webpack.EnvironmentPlugin({
// COUCHDB or COSMOSDB
DATABASE_SERVICE: 'COUCHDB',
// Azure CosmosDB Read-only Key!!!
COSMOS_KEY: '',
// Database endpoint
// Be sure to use a readonly account for CouchDB!!!
COSMOS_ENDPOINT: 'https://recordermoe.documents.azure.com:443/',
COUCH_ENDPOINT: 'https://username:[email protected]/',
// Blob storage / S3 endpoint
// https://myaccount.blob.core.windows.net/mycontainer
// https://s3.recorder.moe/mycontainer
BLOB_ENDPOINT_PUBLIC: '',
}),
],
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'ts-loader',
options: {
transpileOnly: true,
},
},
],
},
devtool: 'source-map',
};