VueJs - Transpile service-worker.ts to service-worker.js

Viewed 174

I'm trying to get my typescript service-worker.ts to transpile as service-worker.js inside my VueJs project. When i build the project, the build just copies the typescript file to the output as service-worker.js (not transpiling the typescript file)

My Vue.Config file

module.exports = {
pwa: {
    name:"Territory Dashboards",
    workboxPluginMode: "InjectManifest",
    workboxOptions: {
        swSrc: "src/service-worker.ts",
        swDest:"service-worker.js",
        globPatterns : ["**/*.{jpg,svg,png,jpeg,gif,ico,webmanifest,eot,ttf,woff2,js,html,css}"],
        
    }
}
}

How do i get the build to transpile the ts file into js and not just simple copy/merge them together ?

0 Answers
Related