How to copy the .js file under source to the temp directory? #1118
-
I'm planning to migrate from vuepress1 to vuepress2, but I'm running into a problem. I'm not used to writing js in md files. In vuepress1, I use relative paths to use js files. But there are more temps in vuepress2, and the js files will not be copied to the temp directory. Although I can use @source + absolute path to temporarily solve the problem, but I think this is too stupid, is there any way to use js files with relative paths like vuepress1? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
One of the easiest way is to start a chokidar instance in onPrepared lifecycle and copy js file to your temp dir. Also you should "watch" those files in devServer. Also, please remember you are free to use alias. ( |
Beta Was this translation helpful? Give feedback.
One of the easiest way is to start a chokidar instance in onPrepared lifecycle and copy js file to your temp dir. Also you should "watch" those files in devServer.
Also, please remember you are free to use alias. (
@source
itself actually is a alia)