electron-vue icon indicating copy to clipboard operation
electron-vue copied to clipboard

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

Open KyLoc20 opened this issue 4 years ago • 0 comments
trafficstars

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.
  • Node version: v10.8.0
  • NPM version: 6.14.9
  • vue-cli version: (if necessary)4.4.6
  • Operating System: win10-x64

KyLoc20 avatar Jan 07 '21 17:01 KyLoc20