Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.6k views
in Technique[技术] by (71.8m points)

Vue-cli4 无法解析freemaker模板 :parse error

打包一个文件模板./pulic/index.html,导出的生成java的渲染模板index.ftl
在html中使用了freemaker的语法<#include>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= htmlWebpackPlugin.options.title %></title>
  </head>
  <body>
<!--这里!!-->
     <%= "\<#include 'header/header.ftl'\>" %>
     <#include 'header/header.ftl'> <!--或者是这种写法,两个都是一个样报错-->
<!--这里!!-->
    <noscript>
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
</html>

中间插入了一个 freemaker 的语法 <#inlucde ...>
运行npm run build 结果报错了:
image.png

令人费解,是不是我应该设置什么
家人们帮我分析一下。。谢谢大家


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...