我有一个集成了 electron 和 svelte 以及 typescript 支持的设置。
当我运行rollup脚本来编译 svelte 应用程序时,出现无法找到模块./App.svelte错误,如下所示。
Plugin typescript: @rollup/plugin-typescript TS2307: Cannot find module './App.svelte' or its corresponding type declarations.
这是我的package.json配置:
{
"name": "tapwire-electron-first",
"productName": "tapwire-electron-first",
"version": "1.0.0",
"description": "My Electron application description",
"main": "dist/index.js",
"scripts": {
"electron-start": "tsc && electron-forge start",
"electron-package": "electron-forge package",
"electron-make": "electron-forge make",
"electron-publish": "electron-forge publish",
"electron-lint": "eslint --ext .ts .",
"svelte-build": "rollup -c",
"svelte-dev": "rollup -c -w",
"svelte-start": "sirv public",
"svelte-validate": "svelte-check",
"start": "run-p svelte-dev electron-start"
},
"keywords": [],
"author": {
"name": "nateshmbhat",
},
"license": "MIT",
"config": {
"forge": {
"packagerConfig": {},
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "tapwire_electron_first"
}
},
{
"name": "@electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "@electron-forge/maker-deb",
"config": {}
},
{
"name": "@electron-forge/maker-rpm",
"config": {}
}
]
}
},
"devDependencies": {
"@electron-forge/cli": "^6.0.0-beta.53",
"@electron-forge/maker-deb": "^6.0.0-beta.53",
"@electron-forge/maker-rpm": "^6.0.0-beta.53",
"@electron-forge/maker-squirrel": "^6.0.0-beta.53",
"@electron-forge/maker-zip": "^6.0.0-beta.53",
"@rollup/plugin-commonjs": "^15.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-typescript": "^6.0.0",
"@types/node": "^14.11.2",
"@typescript-eslint/eslint-plugin": "^2.34.0",
},
一只名叫tom的猫
至尊宝的传说
慕桂英3389331
慕的地10843
相关分类