我使用 Aurelia CLI 创建了一个默认的 Hello World 应用程序,该应用程序已确认使用 Aurelia 运行。
Aurelia 在根目录中生成了一个 index.html:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Aurelia</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body aurelia-app="main">
<script src="scripts/vendor-bundle.js" data-main="aurelia-bootstrapper"></script>
</body>
</html>
从那里我简单地创建了一个基于 Electron QuickStart main.js 的 main.js 并使用 npm install --save-dev
安装了 Electron。我将 main.js 设置为项目的驱动程序并启动了 Electron。
应用程序索引打开了,但是 Electron 是一片空白。让 Aurelia 使用 Electron 的正确步骤是什么?
我已经使用 Electron 创建了一些基本的 JavaScript 项目,但我似乎无法让其他网络应用程序运行。 Angular 也是如此。
Node 一直在尖叫:
(node:5372) Warning: a promise was rejected with a non-error: [object String]
process.on @ internal/process/warning.js:21
PLATFORM.Loader 的问题:
Unhandled rejection No PLATFORM.Loader is defined and there is neither a System API (ES6) or a Require API (AMD) globally available to load your app.
printWarning @ vendor-bundle.js:1386
最佳答案
您可以尝试将您的 html-webpack-plugin
更新到最新版本吗?我认为这是一个 webpack 配置问题。
关于javascript - 如何使用 Electron 运行 Aurelia 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44424414/