-
Notifications
You must be signed in to change notification settings - Fork 109
Expand file tree
/
Copy pathwebpack.dev.js
More file actions
45 lines (44 loc) · 1.11 KB
/
webpack.dev.js
File metadata and controls
45 lines (44 loc) · 1.11 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
const path = require('path');
const webpack = require('webpack');
module.exports = {
mode: 'development',
entry: ['./src/deepstream'],
output: {
path: __dirname,
filename: './dist/bundle/ds.js',
library: 'DeepstreamClient',
libraryTarget: 'umd',
globalObject: 'this'
},
resolve: {
extensions: ['.ts', '.js'],
alias: {
[path.resolve(__dirname, 'src/connection/socket-factory.ts')]:
path.resolve(__dirname, 'src/connection/socket-factory-browser.ts')
},
fallback: {
fs: false,
module: false,
url: false,
buffer: require.resolve('buffer/')
}
},
module: {
rules: [{
test: /\.ts$/,
loader: 'ts-loader',
exclude: /node_modules/
}],
},
plugins: [
new webpack.IgnorePlugin({resourceRegExp: /url/}),
new webpack.IgnorePlugin({resourceRegExp:/node-localstorage/}),
new webpack.ProvidePlugin({Buffer: ['buffer', 'Buffer']})
],
ignoreWarnings: [
{
module: /node_modules\/protobufjs\/src\/util\/inquire\.js/,
message: /Critical dependency: the request of a dependency is an expression/
}
]
};