0

I'm trying to make a chrome extension with Vue 3 using Vue CLI which requires a script to run in the background.

I have a background.ts file in my src/ directory, and want to know how I can configure Vue CLI to compile that and put it in the dist/ folder when I build the project.

3
  • Typescript files would need to be converted to a js file. You can probably do with a typescript cli command: stackoverflow.com/questions/12678716/… Commented Aug 16, 2021 at 13:04
  • @Riza Khan I was considering just compiling that one script and copying it into dist/ in a npm script after I built the project, but it seems kinda janky and there are probably better ways (that I don't know of, hence why I asked) though webpack config or Vue CLI config. That might just be what I need to do for now until I find out a better way. Commented Aug 16, 2021 at 13:11
  • You didn't explain why you need that. This sounds like XY problem. Commented Aug 16, 2021 at 13:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.