You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know you're more into Angular and React, but can you think of any potential reason that this error...
Uncaught ReferenceError: Package is not defined
...would show up if I don't add:
import 'meteor-client'
before other Meteor-related imports in all files?
I already imported 'meteor-client' in my main JS file. The code is working as long as I have the same line repeated in all other files that try to use Meteor. But I see you don't do it with React, so I guess it should work without it.
Error shows up both when I use special .vue files syntax and pure JS files.
My configs:
externals: function (context, request, callback) {
var match = request.match(/^meteor\/(.+)$/);
var pack = match && match[1];
var locator = pack && 'Package["' + pack + '"]';
return locator ? callback(null, locator) : callback();
},
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'),
api: resolve('api/server')
}
},
package.json:
(scripts)
"api": "cd api && meteor run --port=8000",
"bundle-meteor-client": "meteor-client bundle -s api --url=localhost:8000"
(...)
(dev dependencies)
"meteor-client-bundler": "^0.1.1"
The text was updated successfully, but these errors were encountered:
gustojs
changed the title
"Package is not defined" if 'meteor-client' not imported separately to each .vue file
"Package is not defined" if 'meteor-client' not imported separately to each file in Vue project
Mar 26, 2017
I know you're more into Angular and React, but can you think of any potential reason that this error...
...would show up if I don't add:
before other Meteor-related imports in all files?
I already imported 'meteor-client' in my main JS file. The code is working as long as I have the same line repeated in all other files that try to use Meteor. But I see you don't do it with React, so I guess it should work without it.
Error shows up both when I use special
.vue
files syntax and pure JS files.My configs:
package.json:
meteor-client.config.json:
The text was updated successfully, but these errors were encountered: