forked from jsforce/jsforce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.test.js
47 lines (46 loc) · 1.04 KB
/
webpack.config.test.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
45
46
47
const path = require('path');
const webpack = require('webpack');
module.exports = {
mode: 'development',
module: {
rules: [
{
test: /\.ts$/,
include: [path.join(__dirname, 'src'), path.join(__dirname, 'test')],
use: ['babel-loader'],
},
{
test: /\.js$/,
use: ['source-map-loader'],
enforce: 'pre',
},
],
},
resolve: {
extensions: ['.ts', '.js'],
fallback: {
"path": require.resolve("path-browserify"),
"stream": require.resolve("stream-browserify"),
"assert": require.resolve("assert/"),
}
},
externals: {
jsforce: 'jsforce',
},
devtool: 'inline-source-map',
plugins: [
new webpack.ProvidePlugin({
process: 'process/browser'
}),
new webpack.EnvironmentPlugin({
'SF_LOGIN_URL': '',
'SF_USERNAME': '',
'SF_PASSWORD': '',
'SF_OAUTH2_CLIENT_ID': '',
'SF_OAUTH2_CLIENT_SECRET': '',
'SF_OAUTH2_REDIRECT_URI': '',
'SF_AJAX_PROXY_URL': '',
'DEBUG': '',
}),
],
};