-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.js
More file actions
55 lines (51 loc) · 1.86 KB
/
webpack.config.js
File metadata and controls
55 lines (51 loc) · 1.86 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
const path = require('path');
module.exports = {
mode: 'production',
target: 'node',
entry: {
// Node files
'nodes/CloudflareR2/CloudflareR2.node': './nodes/CloudflareR2/CloudflareR2.node.ts',
'nodes/CloudflareD1/CloudflareD1.node': './nodes/CloudflareD1/CloudflareD1.node.ts',
'nodes/CloudflareAI/CloudflareAi.node': './nodes/CloudflareAI/CloudflareAi.node.ts',
'nodes/CloudflareKV/CloudflareKv.node': './nodes/CloudflareKV/CloudflareKv.node.ts',
'nodes/CloudflareQueue/CloudflareQueue.node': './nodes/CloudflareQueue/CloudflareQueue.node.ts',
'nodes/CloudflareQueue/CloudflareQueueTrigger.node': './nodes/CloudflareQueue/CloudflareQueueTrigger.node.ts',
// Credential files
'credentials/CloudflareApi.credentials': './credentials/CloudflareApi.credentials.ts',
// Description files
'nodes/CloudflareKV/CloudflareKVDescription': './nodes/CloudflareKV/CloudflareKVDescription.ts',
'nodes/CloudflareQueue/CloudflareQueueDescription': './nodes/CloudflareQueue/CloudflareQueueDescription.ts',
'nodes/CloudflareR2/CloudflareR2BucketDescription': './nodes/CloudflareR2/CloudflareR2BucketDescription.ts',
'nodes/CloudflareR2/CloudflareR2ObjectDescription': './nodes/CloudflareR2/CloudflareR2ObjectDescription.ts',
'nodes/CloudflareR2/awsSignatureV4': './nodes/CloudflareR2/awsSignatureV4.ts',
// Index file
'index': './index.ts'
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].js',
libraryTarget: 'commonjs2',
clean: true
},
module: {
rules: [
{
test: /\.ts$/,
use: 'ts-loader',
exclude: /node_modules/
}
]
},
resolve: {
extensions: ['.ts', '.js']
},
externals: {
// Exclude n8n dependencies - they're provided by the n8n runtime
'n8n-workflow': 'commonjs2 n8n-workflow',
'n8n-core': 'commonjs2 n8n-core'
},
optimization: {
minimize: false // Keep readable for debugging
},
devtool: 'source-map'
};