Webpack plug-in html-webpack-plugin, how to deal with jsp or ftl (freemarker) files?

new HtmlWebpackPlugin({
  filename: "index.jsp",
  template: "./src/template.jsp"
})

Child html-webpack-plugin for "index.jsp":
     1 asset
       [0] ./node_modules/_html-webpack-plugin@3.2.0@html-webpack-plugin/lib/loader.js!./src/template.jsp
984 bytes {0} [built] [failed] [1 error]

    ERROR in ./node_modules/_html-webpack-plugin@3.2.0@html-webpack-plugin/lib/loader.js!./src/template.jsp
    Module build failed: SyntaxError: Invalid or unexpected token
        at Function (<anonymous>)
        at C:\Users\htbst\Desktop\html-webpack-plugin\node_modules\_lodash@4.17.11@lodash\lodash.js:14866:16
        at apply (C:\Users\htbst\Desktop\html-webpack-plugin\node_modules\_lodash@4.17.11@lodash\lodash.js:473:27)
        at C:\Users\htbst\Desktop\html-webpack-plugin\node_modules\_lodash@4.17.11@lodash\lodash.js:15250:16
        at apply (C:\Users\htbst\Desktop\html-webpack-plugin\node_modules\_lodash@4.17.11@lodash\lodash.js:475:27)
        at C:\Users\htbst\Desktop\html-webpack-plugin\node_modules\_lodash@4.17.11@lodash\lodash.js:6569:16
        at Function.template (C:\Users\htbst\Desktop\html-webpack-plugin\node_modules\_lodash@4.17.11@lodash\lodash.js:14865:20)
        at Object.module.exports (C:\Users\htbst\Desktop\html-webpack-plugin\node_modules\_html-webpack-plugin@3.2.0@html-webpack-plugin\lib\loader.js:28:22)

step1

npm install raw-loader --save-dev

step2

new HtmlWebpackPlugin({
  filename: 'index.jsp',
  template: 'raw-loader!./src/template.jsp'
})

self-question and answer, 6 ah

Menu