1

Проект построен на базе шаблона https://github.com/SimulatedGREG/electron-vue

После устанвоки библотеки https://github.com/olefirenko/vue-google-autocomplete получил в консоли ошибку:

vm.js:88 Uncaught E:\tempgen\node_modules\vue-google-autocomplete\src\VueGoogleAutocomplete.vue:1
(function (exports, require, module, __filename, __dirname, process, global, Buffer) { return function (exports, require, module, __filename, __dirname) { <template>
                                                                                                                                                           ^

SyntaxError: Unexpected token '<'
    at new Script (vm.js:88:7)
    at createScript (vm.js:263:10)
    at Object.runInThisContext (vm.js:311:10)
    at wrapSafe (internal/modules/cjs/loader.js:1038:15)
    at Module._compile (internal/modules/cjs/loader.js:1101:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1166:10)
    at Module.load (internal/modules/cjs/loader.js:981:32)
    at Module._load (internal/modules/cjs/loader.js:881:14)
    at Function.Module._load (electron/js2c/asar.js:769:28)
    at Module.require (internal/modules/cjs/loader.js:1023:19)

1 ответ 1

0

В файл webpack.renderer.config.js нужно добавить в массив whiteListedModules название библиотеки 'vue-google-autocomplete'

`let whiteListedModules = ['vue','axios','vue-electron', 'vue-router', 'vuex', 'vuex-    electron','element-ui', 'vue-google-autocomplete']`

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.