You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While attempting to setup the web example, I was unable to run a production (minified) build.
The error while building I retrieved was the following:
> const context_base_1 = __webpack_require__(5910);
> ^
> ERROR: Unexpected token: keyword «const»
> at JS_Parse_Error.get (eval at
I am not using the @opentelemetry/context-zone package or setting a contextManager on the provider.
I am bundling with Webpack 4, using Babel as the transpilation tool.
What did you expect to see?
I expected the build to complete.
What did you see instead?
It seems that published packages are not transpiling to ES5. We currently still support older browsers, so we need to have builds that transpile to ES5. It is common to ignore node_modules when transpiling. I expected the published npm packages to have transpiled code so that I don't need to explicitly transpile the @opentelemetry dependencies in the webpack configuration.
The text was updated successfully, but these errors were encountered:
Some of our packages are compiled down to es5 (api, semantic conventions, and context-base I believe) in order to support modules that want to depend on the opentelemetry API, but the SDK requires browser and node APIs that are newer and it wouldn't work on such an old target anyways.
Targeting es5 for SDK components may also change behavior in subtle ways. See an example of that here #593 (comment)
What version of OpenTelemetry are you using?
0.10.2
What version of Node are you using?
12.14.1
What did you do?
While attempting to setup the web example, I was unable to run a production (minified) build.
The error while building I retrieved was the following:
I am not using the
@opentelemetry/context-zone
package or setting acontextManager
on the provider.I am bundling with Webpack 4, using Babel as the transpilation tool.
What did you expect to see?
I expected the build to complete.
What did you see instead?
It seems that published packages are not transpiling to ES5. We currently still support older browsers, so we need to have builds that transpile to ES5. It is common to ignore
node_modules
when transpiling. I expected the published npm packages to have transpiled code so that I don't need to explicitly transpile the@opentelemetry
dependencies in the webpack configuration.The text was updated successfully, but these errors were encountered: