我有一个使用 vue cli 3 的 Vue 应用程序。我正在按照此处的指南尝试构建我的应用程序vue-cli-service build --target wc --name my-element [entry]
为了测试输出,我有一个 index.html 文件:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
</head>
<body>
<my-project></my-project>
<script src="https://unpkg.com/vue"></script>
<script src="my-project.min.js"></script>
</body>
</html>Run Code Online (Sandbox Code Playgroud)
它指向 my-project.min.js 的这一部分:
我的 main.js:
import "@babel/polyfill";
import Vue from "vue";
import MyProject from "./MyProject.vue";
import router from "./router";
import store from "./store/index";
Vue.config.productionTip = false;
new Vue({
router,
store,
render: …Run Code Online (Sandbox Code Playgroud)我使用 Sublime Text 并使用终端来运行我的代码。
我更喜欢使用 Python Shell 来运行我的代码,因为它有颜色并且不难看。
除了保存然后在 IDLE 中打开之外,还有什么简单的方法可以做到这一点?