aui / art-template

High performance JavaScript templating engine
https://aui.github.io/art-template/
MIT License
9.86k stars 2.68k forks source link

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

Open niantuo opened 3 years ago

niantuo commented 3 years ago

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

uino-wuixn commented 3 years ago

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

uino-wuixn commented 3 years ago

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

uino-wuixn commented 3 years ago

ssss acd029eabe582da81204e7f8570c121b

dddd

houkunlin commented 1 year ago

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