我刚刚使用 webpack2 和 vue2 开发了这个项目。我有其他无法通过 npm 安装的外部插件。所以我的问题是包含这些文件的最佳方式。这是我的index.html
<html>
<head>
</head>
<body>
<div id="app"></div>
<script src="app.js"></script>
<script src="/static/js/flowchart.js"></script>
<script src="/static/js/exteral2.js"></script>
</body>
</html>
这是我的 index.html 文件,其中包含一些外部 js 文件。我们可以做一些捆绑,这样我们就不需要将这些外部文件包含到 index.html 中,或者这是包含外部 js 文件的唯一方法。
任何帮助将不胜感激。谢谢
在具有相对路径的代码中包含外部文件: