更新时间:2022-11-02 23:14:13
以下内容应放在tsconfig.json
{
...
"compilerOptions": {
...
"resolveJsonModule": true, //already there
"esModuleInterop": true,
...
},
...
"allowSyntheticDefaultImports": true
}
然后只需在您的组件中导入以下内容
and then simply import the following in your component
import VersionInfo from 'src/assets/version.json';