我正在尝试设置我的vue应用程序,以便客户可以向地址发送电子邮件。我的应用程序工作正常,但当我安装firebase,发送网格和节点邮件包时,这个错误显示
error in external "https://smtpjs.com/v3/smtp.js?vue&type=script&lang=js&"
The target environment doesn't support dynamic import() syntax so it's not possible to use external type 'module' within a script
ERROR in external "https://smtpjs.com/v3/smtp.js?vue&type=script&lang=js&"
The target environment doesn't support dynamic import() syntax so it's not possible to use external type 'module' within a script
@ ./src/views/Home.vue 2:0-75 3:0-70 3:0-70 10:2-8
@ ./src/router/index.js 3:0-37 17:13-17
@ ./src/main.js 4:0-30 12:2-8
my main.js file
import Vue from "vue";
import App from "./App.vue";
import "./registerServiceWorker";
import router from "./router";
import { BootstrapVue, IconsPlugin } from "bootstrap-vue";
Vue.config.productionTip = false;
Vue.use(BootstrapVue);
Vue.use(IconsPlugin);
import "bootstrap/dist/css/bootstrap.css";
import "bootstrap-vue/dist/bootstrap-vue.css";
new Vue({
router,
render: (h) => h(App),
}).$mount("#app");
我已经运行了一些测试邮件,它们似乎发送得很好,但是我现在无法部署我的应用程序。
我认为你应该把你的动态导入转换为静态导入,就像这样:
Import ... from moduleName();
import ... from 'moduleName':