我正在使用 @vue/cli 5.0.0-beta.3、vue 3.2.8 和 element-plus 1.1.0-beta.8。这是我的示例项目:https ://github.com/linrongbin16/financial_tools_app3
我在我的index.html
文件中导入 element-plus 1.1.0-beta.8 CDN,但它报告错误:
Uncaught ReferenceError: exports is not defined
我不知道如何修复它,或者它是否与我的tsconfig.json
设置有任何关系:
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"experimentalDecorators": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"useDefineForClassFields": true,
"sourceMap": true,
"baseUrl": ".",
"types": [
"webpack-env"
],
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"tests/**/*.ts",
"tests/**/*.tsx"
],
"exclude": [
"node_modules"
]
}