ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## Electron 通过Electron可以使用js编写跨平台前端界面。 ## Vue Vue是一个js前端框架,简单好写。 ## electron-vue electron-vue是一个Electron使用vue开发的模板示例。 ## 安装并初始化electron-vue ~~~ npm install -g vue-cli vue init simulatedgreg/electron-vue my-project cd my-project npm install npm run dev ~~~ ## 问题处理 npm run dev的时候会提示process is not defined。 解决办法是: 在.electron-vue/webpack.renderer.config.js和.electron-vue/webpack.web.config.js文件中找到`HtmlWebpackPlugin`代码段并更改为如下代码: ~~~ new HtmlWebpackPlugin({ filename: 'index.html', template: path.resolve(__dirname, '../src/index.ejs'), templateParameters(compilation, assets, options) { return { compilation: compilation, webpack: compilation.getStats().toJson(), webpackConfig: compilation.options, htmlWebpackPlugin: { files: assets, options: options }, process, }; }, minify: { collapseWhitespace: true, removeAttributeQuotes: true, removeComments: true }, nodeModules: process.env.NODE_ENV !== 'production' ? path.resolve(__dirname, '../node_modules') : false }), ~~~