from Terser Unexpected token punc «:», expected punc «,» #4018
Unanswered
devgalintown
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Otel versions
"@opentelemetry/api": "^1.4.1",
"@opentelemetry/auto-instrumentations-web": "^0.32.2",
"@opentelemetry/context-zone": "^1.13.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.39.1",
"@opentelemetry/instrumentation": "^0.39.1",
"@opentelemetry/instrumentation-document-load": "^0.32.2",
"@opentelemetry/instrumentation-user-interaction": "^0.32.3",
"@opentelemetry/instrumentation-xml-http-request": "^0.39.1",
"@opentelemetry/propagator-b3": "^1.13.0",
"@opentelemetry/sdk-trace-web": "^1.13.0",
"@opentelemetry/semantic-conventions": "^1.13.0",
I am using Vue.js :
"vue": "^2.7.14",
"vue-analytics": "^5.22.1",
"vue-carousel": "^0.7.3",
"vue-clipboard2": "^0.3.1",
"vue-date-dropdown": "^1.0.5",
"vue-i18n": "^8.27.0",
"vue-loader": "^15.10.1",
"vue-multiselect": "^2.1.6",
"vue-recaptcha": "^1.2.0",
"vue-router": "^3.6.5",
"vue-select": "^2.6.4",
"vue-server-renderer": "^2.7.14",
"vue-slick": "^1.2.0",
"vue-slider-component": "2.7.7",
"vue-social-sharing": "^2.4.7",
"vue-style-loader": "^4.1.3",
"vue-template-compiler": "^2.7.14",
"vue-the-mask": "^0.11.1",
"vue2-circle-progress": "^1.2.3",
"vuejs-datepicker": "^1.6.2",
"vuex": "^3.6.2",
"vuex-router-sync": "^5.0.0",
Using "terser-webpack-plugin": "^4.2.3", in a Vue,js project.
Prod Config file structure:
new TerserPlugin({
parallel: true,
extractComments: false,
sourceMap: isDev,
terserOptions:{
compress: isProd,
ecma: 2020
},
}),
It was all building okay before I added Opentelemetry instrumentation.
codebase is similar to this:
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http'
import { WebTracerProvider, BatchSpanProcessor, SimpleSpanProcessor, ConsoleSpanExporter } from '@opentelemetry/sdk-trace-web'
import { registerInstrumentations } from '@opentelemetry/instrumentation'
import { getWebAutoInstrumentations } from '@opentelemetry/auto-instrumentations-web'
export default function initializeOtel() {
const headers = {
"Content-Type": "application/json"
}
const collectorOptions = new OTLPTraceExporter(headers)
const provider = new WebTracerProvider()
provider.addSpanProcessor(new BatchSpanProcessor(collectorOptions))
provider.register()
const instrumentations = [
getWebAutoInstrumentations()
]
registerInstrumentations(instrumentations)
}
Initialized in base vue file :
beforeMount() {
initializeOtel()
}
I tried removing terser package but still got the error. Tried ecma script version change, comma remove/add among other. Please help me figure this out.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions