用vue服务器渲染的问题

<% for (var chunk of webpack.chunks) {
    for (var file of chunk.files) {
      if (file.match(/\.(js|css)$/)) { %>
<link rel="<%= chunk.initial?'preload':'prefetch' %>" href="<%= htmlWebpackPlugin.files.publicPath + file %>" as="<%= file.match(/\.css$/)?'style':'script' %>"><% }}} %>

报错信息

/home/hldev/IdeaProjects/intelligence-system-frontend/node_modules/._lodash.template@4.4.0@lodash.template/index.js:1097
    throw result;
    ^

SyntaxError: Unexpected token =
    at Function (<anonymous>)
    at /home/hldev/IdeaProjects/intelligence-system-frontend/node_modules/._lodash.template@4.4.0@lodash.template/index.js:1089:12
    at apply (/home/hldev/IdeaProjects/intelligence-system-frontend/node_modules/._lodash.template@4.4.0@lodash.template/index.js:74:25)
    at /home/hldev/IdeaProjects/intelligence-system-frontend/node_modules/._lodash.template@4.4.0@lodash.template/index.js:1126:12
    at apply (/home/hldev/IdeaProjects/intelligence-system-frontend/node_modules/._lodash.template@4.4.0@lodash.template/index.js:76:25)
    at /home/hldev/IdeaProjects/intelligence-system-frontend/node_modules/._lodash.template@4.4.0@lodash.template/index.js:317:12
    at template (/home/hldev/IdeaProjects/intelligence-system-frontend/node_modules/._lodash.template@4.4.0@lodash.template/index.js:1088:16)
    at parseTemplate (/home/hldev/IdeaProjects/intelligence-system-frontend/node_modules/._vue-server-renderer@2.3.0@vue-server-renderer/build.js:1867:11)
    at new TemplateRenderer (/home/hldev/IdeaProjects/intelligence-system-frontend/node_modules/._vue-server-renderer@2.3.0@vue-server-renderer/build.js:1938:7)
    at createRenderer$1 (/home/hldev/IdeaProjects/intelligence-system-frontend/node_modules/._vue-server-renderer@2.3.0@vue-server-renderer/build.js:5658:26)
    at createRenderer$$1 (/home/hldev/IdeaProjects/intelligence-system-frontend/node_modules/._vue-server-renderer@2.3.0@vue-server-renderer/build.js:6037:10)
    at Object.createBundleRenderer (/home/hldev/IdeaProjects/intelligence-system-frontend/node_modules/._vue-server-renderer@2.3.0@vue-server-renderer/build.js:5969:20)
    at createRenderer (/home/hldev/IdeaProjects/intelligence-system-frontend/server.js:36:43)
    at require (/home/hldev/IdeaProjects/intelligence-system-frontend/server.js:30:20)
    at Compiler.clientCompiler.plugin (/home/hldev/IdeaProjects/intelligence-system-frontend/build/setup-dev-server.js:32:9)
    at Compiler.applyPlugins (/home/hldev/IdeaProjects/intelligence-system-frontend/node_modules/._tapable@0.2.6@tapable/lib/Tapable.js:61:14)
阅读 3.8k
2 个回答

这关vue服务器渲染什么关系呢.

新手上路,请多包涵

你好,请问这个问题后来解决了吗,我也是服务端渲染端时候碰到这个问题

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题