Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
niantuo opened this issue May 31, 2021 · 4 comments
Open

Comments

@niantuo
Copy link

niantuo commented May 31, 2021

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
Copy link

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

@uino-wuixn
Copy link

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

@uino-wuixn
Copy link

ssss
acd029eabe582da81204e7f8570c121b

dddd

@houkunlin
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants