SimulatedGREG / electron-vue

An Electron & Vue.js quick start boilerplate with vue-cli scaffolding, common Vue plugins, electron-packager/electron-builder, unit/e2e testing, vue-devtools, and webpack.
https://simulatedgreg.gitbooks.io/electron-vue/content/
MIT License
15.46k stars 1.54k forks source link

Why not change single quote to double quote in index.ejs? index.ejs文件中单引号报错 #1058

Open KyLoc20 opened 3 years ago

KyLoc20 commented 3 years ago

Found an issue or bug with electron-vue? Tell me all about it!

When i first initiated the project by default and checked the file index.ejs in ./src, there is a syntax error present in line 9: require('module').globalPaths.push('<%= htmlWebpackPlugin.options.nodeModules.replace(/\\/g, '\\\\') %>')

我第一次初始化项目时发现./src/index.ejs文件中有如下报错: require('module').globalPaths.push('<%= htmlWebpackPlugin.options.nodeModules.replace(/\\/g, '\\\\') %>')

So i changed the single quotes to double quotes: require('module').globalPaths.push("<%= htmlWebpackPlugin.options.nodeModules.replace(/\\/g, '\\\\') %>")

我想应该是单引号要改成双引号,于是我这样做了: require('module').globalPaths.push("<%= htmlWebpackPlugin.options.nodeModules.replace(/\\/g, '\\\\') %>")

This made me feel better and my app could run again. Cuz i know little about .ejs, i wish someone to tell why it is here.

于是我好起来了,但我很菜不知道为什么,有没有好心人告诉我一下。=_=

If visual, provide a screenshot.

sn9fXQ.jpg

Tell me about your development environment.