Hello all
I have npm installed Vue.js 2.6.12 in Cocos Creator 3.7.2 and imported the following
import Vue from ‘vue’;
new Vue({…}) ;
I got the following error when using it with
index.js:1 ReferenceError: process is not defined
at _cjsLoader.define. /vue.runtime.common.prod.js (vue.runtime.common.js:10:2)
at CjsLoader._load (cjs-loader.mjs:78:9)
at CjsLoader._tryModuleLoad (cjs-loader.mjs:63:18)
at CjsLoader._require (cjs-loader.mjs:42:14)
at CjsLoader.require (cjs-loader.mjs:27:21)
at Object.execute (vue.runtime.common.mjs:7:8)
at doExec (system.js:488:32)
at postOrderExec (system.js:478:23)
at system.js:467:30
at Array.forEach ()
I tried changing the import from part but could not get it to work. What should I do?
Translated with DeepL Translate: The world's most accurate translator (free version)