varsnap 1.11.2 → 1.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- export declare const version = "1.11.2";
1
+ export declare const version = "1.11.3";
2
2
  export declare const clientName: string;
3
3
  export interface Config {
4
4
  varsnap: boolean;
@@ -3,7 +3,7 @@ const produceURL = 'https://www.varsnap.com/api/snap/produce/';
3
3
  const consumeURL = 'https://www.varsnap.com/api/snap/consume/';
4
4
  const produceTrialURL = 'https://www.varsnap.com/api/trial/produce/';
5
5
  const trialGroupURL = 'https://www.varsnap.com/api/trial_group/';
6
- export const version = '1.11.2';
6
+ export const version = '1.11.3';
7
7
  export const clientName = 'javascript.' + version;
8
8
  const defaultConfig = {
9
9
  varsnap: true,
@@ -0,0 +1,15 @@
1
+ declare const _default: () => {
2
+ devtool: string;
3
+ target: string;
4
+ output: {
5
+ path: string;
6
+ filename: string;
7
+ globalObject: string;
8
+ library: {
9
+ name: string;
10
+ type: string;
11
+ export: string;
12
+ };
13
+ };
14
+ }[];
15
+ export default _default;
@@ -0,0 +1,80 @@
1
+ import path from 'path';
2
+ import process from 'process';
3
+ import webpack from 'webpack';
4
+ import TerserPlugin from 'terser-webpack-plugin';
5
+ import BDWP from 'bundle-declarations-webpack-plugin';
6
+ const isProduction = process.env.NODE_ENV == 'production';
7
+ const generalConfig = {
8
+ entry: './varsnap/index.ts',
9
+ plugins: [
10
+ // Add your plugins here
11
+ // Learn more about plugins from https://webpack.js.org/configuration/plugins/
12
+ new BDWP(),
13
+ new webpack.BannerPlugin({
14
+ banner: 'Varsnap.js v1.11.3',
15
+ }),
16
+ ],
17
+ module: {
18
+ rules: [
19
+ {
20
+ test: /\.(ts|tsx)$/i,
21
+ loader: 'ts-loader',
22
+ exclude: ['/node_modules/'],
23
+ },
24
+ // Add your rules for custom modules here
25
+ // Learn more about loaders from https://webpack.js.org/loaders/
26
+ ],
27
+ },
28
+ resolve: {
29
+ extensions: ['.tsx', '.ts', '.jsx', '.js', '...'],
30
+ alias: {
31
+ './core.js': path.resolve('varsnap/core.ts'),
32
+ },
33
+ },
34
+ optimization: {
35
+ minimize: isProduction,
36
+ minimizer: [new TerserPlugin({
37
+ extractComments: false,
38
+ })],
39
+ }
40
+ };
41
+ const nodeConfig = {
42
+ devtool: 'source-map',
43
+ target: 'node',
44
+ output: {
45
+ path: path.resolve('./dist'),
46
+ filename: isProduction ? 'node.min.cjs' : 'node.cjs',
47
+ globalObject: 'this',
48
+ library: {
49
+ name: 'varsnap',
50
+ type: 'umd',
51
+ export: 'default',
52
+ },
53
+ },
54
+ };
55
+ const browserConfig = {
56
+ devtool: 'source-map',
57
+ target: 'web',
58
+ output: {
59
+ path: path.resolve('./dist'),
60
+ filename: isProduction ? 'browser.min.js' : 'browser.js',
61
+ globalObject: 'this',
62
+ library: {
63
+ name: 'varsnap',
64
+ type: 'umd',
65
+ export: 'default',
66
+ },
67
+ },
68
+ };
69
+ export default () => {
70
+ if (isProduction) {
71
+ generalConfig.mode = 'production';
72
+ }
73
+ else {
74
+ generalConfig.mode = 'development';
75
+ }
76
+ Object.assign(nodeConfig, generalConfig);
77
+ Object.assign(browserConfig, generalConfig);
78
+ return [nodeConfig, browserConfig];
79
+ };
80
+ //# sourceMappingURL=webpack.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webpack.config.js","sourceRoot":"","sources":["../webpack.config.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,OAAO,MAAM,SAAS,CAAC;AAG9B,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,YAAY,MAAM,uBAAuB,CAAC;AACjD,OAAO,IAAI,MAAM,oCAAoC,CAAC;AAEtD,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,YAAY,CAAC;AAE1D,MAAM,aAAa,GAAkB;IACnC,KAAK,EAAE,oBAAoB;IAC3B,OAAO,E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