vue proxy 报错 npmi(vue3+vite+typescript出现does not provide an export named ‘xxx‘ 解决方法)
vue3+vite+typescript出现does not provide an export named ‘xxx’ 解决方法 。
在使用TinyMCE富文本组件时 ,出现以下错误:The requested module ‘/src/main/ts/components/EditorPropTypes.ts?t=1674647216370’ does not provide an export named ‘IPropTypes’ 。
对应EditorPropTypes.ts中的代码:
export interface IPropTypes {
apiKey: string;
cloudChannel: string;
id: string;
init: EditorOptions;
initialValue: string;
outputFormat: ‘html’ | ‘text’;
inline: boolean;
modelEvents: string[] | string;
plugins: string[] | string;
tagName: string;
toolbar: string[] | string;
modelValue: string;
disabled: boolean;
tinymceScriptSrc: string;
}解决方法:
import type{ IPropTypes } from ‘./components/EditorPropTypes’;在import时将import {XXX} from XXX’改成import type {XXX} from ‘XXX’
好像vite会出现问题 ,webpack正常 。创心域SEO版权声明:以上内容作者已申请原创保护,未经允许不得转载,侵权必究!授权事宜、对本内容有异议或投诉,敬请联系网站管理员,我们将尽快回复您,谢谢合作!