【发布时间】:2017-05-13 13:48:13
【问题描述】:
在我认为 Angular2-Electron 应用程序已准备好投入生产后,我将其打包,但在途中遇到了错误。出现的错误是找不到我的引导带和 JQuery。现在我正在通过 node_modules 将它加载到我的 index.html 中。在我不得不打包它之前,这很好用。在本地加载 JQuery 和引导程序以便我的电子应用程序可以找到它的最佳方法是什么? 我得到的错误是错误找不到模块 我理解为什么,这是因为当电子打包东西时,所有东西都被移动到一个文件中,我只是不知道何时何地将引导程序和 JQuery 加载到相应的位置
index.html:
<script>window.$ = window.jQuery = require('../node_modules/jquery/dist/jquery.min.js');</script>
<script src="../node_modules//bootstrap/dist/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap-theme.min.css">
【问题讨论】:
标签: jquery twitter-bootstrap angular electron