启动 Parcel & Edge Chromium 时,标准启动配置选项似乎不起作用。
使用launch
mode 时,浏览器会打开一个新的 Chromium 实例,该实例会丢失所有扩展设置,而attach
mode 只是拒绝加载浏览器,或者导致以下错误循环:
> parcel serve src/index.html
Debugger attached.
ℹ Server running at http://localhost:1234
@parcel/workers: Cannot find module '"c:/Users/jgent/AppData/Local/Programs/Microsoft'
Require stack:
- internal/preload
Error: Cannot find module '"c:/Users/name/AppData/Local/Programs/Microsoft'
Require stack:
- internal/preload
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
at Function.Module._load (internal/modules/cjs/loader.js:667:27)
at Module.require (internal/modules/cjs/loader.js:887:19)
at Module._preloadModules (internal/modules/cjs/loader.js:1147:12)
at loadPreloadModules (internal/bootstrap/pre_execution.js:446:5)
at MessagePort.<anonymous> (internal/main/worker_thread.js:122:5)
at MessagePort.emit (events.js:314:20)
at MessagePort.onmessage (internal/worker/io.js:80:8)
at MessagePort.exports.emitMessage (internal/per_context/messageport.js:11:10)
这是我当前的配置:
启动.json:
{
"version": "0.2.0",
"configurations": [
{
"command": "npm start",
"name": "Parcel",
"request": "launch",
"type": "node-terminal"
},
{
"type": "edge",
"request": "launch",
"version": "canary",
"name": "Debug",
"url": "http://localhost:1234",
"webRoot": "${workspaceFolder}",
"breakOnLoad": true,
"sourceMapPathOverrides": {
"../*": "${webRoot}/*"
}
}
],
"compounds": [
{
"name": "Parcel/Debug",
"configurations": ["Debug", "Parcel"]
}
]
}
包.json:
{
"scripts": {
"start": "parcel serve src/index.html"
},
}
有人有工作配置吗?