react项目通过 import artTemplate from "art-template" 引入异常
niantuo opened this issue · 4 comments
niantuo commented
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
interface Ioptions{ dataId?:string; includeParams?:string[] isRemainHash?:boolean }
uino-wuixn commented
uino-wuixn commented
houkunlin commented
我用 TypeScript 是 import * as artTemplate from "art-template"
这样引入的