node.js - 如何在vue模板中使用nodeJS?
ringa_lee
ringa_lee 2017-04-17 15:53:31
0
2
641
ringa_lee
ringa_lee

ringa_lee

reply all(2)
迷茫

Thanks for the invitation. After reading the question, I was a little confused. Why should I write Notepad in the .vue file?
.vue file will eventually be compiled and compressed into a js file, and finally used in the browser environment. There must be no fs module. Do you want to store it on the user's machine? fs模块的,莫非你是想存在用户的机器上?
webpack.config.js是脚手架里的文件,运行在nodejs环境中,是有fsAnd webpack.config.js is a file in the scaffolding. It runs in the nodejs environment and has the fs module. If you want to Server side, then this step should be to send a request to the backend to save the notepad.

Peter_Zhu

You must first understand that vue is the front-end field, while node.js is the back-end field. Although they are both js, they can do completely different things.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template