How to convert a .vue file to a .js file?

I want to convert all files written by others in .vue format into .js files. What tools should I use? It is not packaged using webpack.

Mar.14,2021

vue format in addition to js code, there are templates and css, how do you convert it? It would be OK to convert the template to a template attribute string in the component, like this:

export default {
  template: `<div></div>`,
  ...

if this transformation is acceptable, you can call vue's own template compiler to do the transformation, but what about css? I guess I'll just have to throw it away.


you can take a look at vue-loader principle

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b388bb-2c127.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b388bb-2c127.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?