forked from pactsafe/pactsafe-react-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nwb.config.js
49 lines (48 loc) · 899 Bytes
/
nwb.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
45
46
47
48
49
const { LoaderOptionsPlugin } = require('webpack');
const Dotenv = require('dotenv-webpack');
const { version } = require('./package.json');
module.exports = {
type: 'react-component',
devServer: {
https: true,
},
npm: {
esModules: true,
umd: {
global: 'PSReactSDK',
externals: {
react: 'React',
},
},
},
webpack: {
extra: {
plugins: [
new Dotenv(),
new LoaderOptionsPlugin({
options: {
experiments: {
futureDefaults: true,
},
},
}),
],
},
},
babel: {
plugins: [
['@babel/plugin-proposal-export-default-from'],
[
'search-and-replace',
{
rules: [
{
search: '_client-version',
replace: version,
},
],
},
],
],
},
};