Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit 8381e5c

Browse files
Update tsconfig and package.json for webpack builds (#18)
1 parent cbab48d commit 8381e5c

8 files changed

Lines changed: 20 additions & 11 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ npm-debug.log
3131
.nyc_output/
3232
build/
3333

34+
# JS bundle builds
35+
dist/
36+
3437
#backup files
3538
*--
3639
*_backup

packages/opencensus-web-core/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "@opencensus/web-core",
33
"version": "0.0.1",
4-
"description": "OpenCensus Web is a toolkit for collecting application performance and behavior data from client side web browser apps.",
4+
"description":
5+
"OpenCensus Web is a toolkit for collecting application performance and behavior data from client side web browser apps.",
56
"main": "build/src/index.js",
67
"types": "build/src/index.d.ts",
78
"scripts": {
@@ -60,5 +61,6 @@
6061
"webpack": "^4.18.0",
6162
"webpack-cli": "^3.1.0"
6263
},
63-
"dependencies": {}
64+
"dependencies": {},
65+
"sideEffects": false
6466
}

packages/opencensus-web-core/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
"rootDir": ".",
55
"outDir": "build",
66
"pretty": true,
7-
"module": "commonjs",
7+
"module": "es6",
88
"target": "es5",
99
"lib": ["es5", "dom", "es6"],
1010
"strictNullChecks": true,
11+
"noUnusedLocals": true,
12+
"sourceMap": true,
1113
"baseUrl": ".",
1214
"moduleResolution": "node",
1315
"paths": {

packages/opencensus-web-exporter-ocagent/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,6 @@
6363
},
6464
"dependencies": {
6565
"@opencensus/web-core": "^0.0.1"
66-
}
66+
},
67+
"sideEffects": false
6768
}

packages/opencensus-web-exporter-ocagent/src/adapters.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,3 @@ function adaptSpan(span: coreTypes.Span): apiTypes.Span {
182182
sameProcessAsParentSpan: !span.remoteParent,
183183
};
184184
}
185-
186-
function adaptStatus(code: number): apiTypes.Status {
187-
return code ? {code} : {};
188-
}

packages/opencensus-web-exporter-ocagent/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
"rootDir": ".",
55
"outDir": "build",
66
"pretty": true,
7-
"module": "commonjs",
7+
"module": "es6",
88
"target": "es5",
99
"lib": ["es5", "dom", "es6"],
1010
"strictNullChecks": true,
11+
"noUnusedLocals": true,
12+
"sourceMap": true,
1113
"baseUrl": ".",
1214
"moduleResolution": "node",
1315
"paths": {

packages/opencensus-web-instrumentation-perf/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,6 @@
6262
},
6363
"dependencies": {
6464
"@opencensus/web-core": "^0.0.1"
65-
}
65+
},
66+
"sideEffects": false
6667
}

packages/opencensus-web-instrumentation-perf/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
"rootDir": ".",
55
"outDir": "build",
66
"pretty": true,
7-
"module": "commonjs",
7+
"module": "es6",
88
"target": "es5",
99
"lib": ["es5", "dom", "es6"],
10+
"noUnusedLocals": true,
11+
"sourceMap": true,
1012
"strictNullChecks": true,
1113
"baseUrl": ".",
1214
"moduleResolution": "node",

0 commit comments

Comments
 (0)