aui/art-template

react项目通过 import artTemplate from "art-template" 引入异常

niantuo opened this issue · 4 comments

react版本: ^16.13.1
通过 import artTemplate from "art-template" 引入异常,定位代码

const template = require('./lib/index');
const extension = require('./lib/extension');

template.extension = extension;

require.extensions[template.defaults.extname] = extension;

module.exports = template;

编译器提示require.extensions 已废弃,通过console打印require.extensions 为 undefined

interface Ioptions{ dataId?:string; includeParams?:string[] isRemainHash?:boolean }

<script> commentRender("comment-box", { blog: "1234567890", includeParams: [], isRemainHash: true, }); </script>
image

ssss
acd029eabe582da81204e7f8570c121b

dddd

我用 TypeScript 是 import * as artTemplate from "art-template" 这样引入的