forked from portable-cto/airtable-proxy-worker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
30 lines (29 loc) · 924 Bytes
/
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
const webpack = require('webpack');
module.exports = {
entry: "./src/index.js",
mode: "development",
plugins: [
new webpack.DefinePlugin({
wpConfig: {
airtableApiUrl: JSON.stringify(process.env.AIRTABLE_API_URL || 'https://api.airtable.com'),
airtableBaseId: JSON.stringify(process.env.AIRTABLE_API_BASE_ID || ''),
airtableApiVersion: JSON.stringify(process.env.AIRTABLE_API_VERSION || 'v0'),
airtableApiKey: JSON.stringify(process.env.AIRTABLE_API_KEY || ''),
cacheTime: JSON.stringify(process.env.PROXY_CACHE_TIME || 0),
prefix: JSON.stringify(process.env.PROXY_PREFIX || ''),
allowedTargets: JSON.stringify(process.env.ALLOWED_TARGETS || '*'),
},
}),
],
optimization: {
minimize: false
},
performance: {
hints: false
},
output: {
path: __dirname + "/dist",
publicPath: "dist",
filename: "worker.js"
}
};