{"action":"created","issue":{"url":"https://api.github.com/repos/thereactivestack/meteor-webpack/issues/165","repository_url":"https://api.github.com/repos/thereactivestack/meteor-webpack","labels_url":"https://api.github.com/repos/thereactivestack/meteor-webpack/issues/165/labels{/name}","comments_url":"https://api.github.com/repos/thereactivestack/meteor-webpack/issues/165/comments","events_url":"https://api.github.com/repos/thereactivestack/meteor-webpack/issues/165/events","html_url":"https://github.com/thereactivestack/meteor-webpack/issues/165","id":156128139,"number":165,"title":"Can't load modules from meteor shell?","user":{"login":"gsabran","id":4228246,"avatar_url":"https://avatars.githubusercontent.com/u/4228246?v=3","gravatar_id":"","url":"https://api.github.com/users/gsabran","html_url":"https://github.com/gsabran","followers_url":"https://api.github.com/users/gsabran/followers","following_url":"https://api.github.com/users/gsabran/following{/other_user}","gists_url":"https://api.github.com/users/gsabran/gists{/gist_id}","starred_url":"https://api.github.com/users/gsabran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsabran/subscriptions","organizations_url":"https://api.github.com/users/gsabran/orgs","repos_url":"https://api.github.com/users/gsabran/repos","events_url":"https://api.github.com/users/gsabran/events{/privacy}","received_events_url":"https://api.github.com/users/gsabran/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-22T00:26:28Z","updated_at":"2016-05-23T13:38:02Z","closed_at":"2016-05-23T13:23:22Z","body":"I used to be able to load modules from meteor shell like `const {Items} = require('./collections.js');`\r\nWith `webpack:webpack` that seems to now fail and I get:\r\n\r\n```\r\n$ meteor shell\r\n> require('./src/server_and_client/collections.js')\r\nError: Cannot find module './src/server_and_client/collections.js'\r\n    at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:78:1)\r\n    at [object Object]:1:-61\r\n    at Script.(anonymous function) [as runInThisContext] (vm.js:41:22)\r\n    at /Users/me/projectName/.meteor/local/build/programs/server/shell-server.js:366:27\r\n    at /Users/me/.meteor/packages/meteor-tool/.1.3.2_4.lbyo5v++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/meteor-promise/fiber_pool.js:33:40\r\n```\r\n\r\nI'm sure there is a file at `./src/server_and_client/collections.js`"},"comment":{"url":"https://api.github.com/repos/thereactivestack/meteor-webpack/issues/comments/220982474","html_url":"https://github.com/thereactivestack/meteor-webpack/issues/165#issuecomment-220982474","issue_url":"https://api.github.com/repos/thereactivestack/meteor-webpack/issues/165","id":220982474,"user":{"login":"gsabran","id":4228246,"avatar_url":"https://avatars.githubusercontent.com/u/4228246?v=3","gravatar_id":"","url":"https://api.github.com/users/gsabran","html_url":"https://github.com/gsabran","followers_url":"https://api.github.com/users/gsabran/followers","following_url":"https://api.github.com/users/gsabran/following{/other_user}","gists_url":"https://api.github.com/users/gsabran/gists{/gist_id}","starred_url":"https://api.github.com/users/gsabran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsabran/subscriptions","organizations_url":"https://api.github.com/users/gsabran/orgs","repos_url":"https://api.github.com/users/gsabran/repos","events_url":"https://api.github.com/users/gsabran/events{/privacy}","received_events_url":"https://api.github.com/users/gsabran/received_events","type":"User","site_admin":false},"created_at":"2016-05-23T13:38:02Z","updated_at":"2016-05-23T13:38:02Z","body":"Ok. Thanks for the clarification. So is there still a way to access things like collections from the shell? Or is it something that's not possible with webpack? If so, what workflow do you recommend?\r\n\r\nTo clarify things a bit, let's say that my main entry is `'./server.js` which is:\r\n```javascript\r\nimport {Items} from './collections.js'\r\nconsole.log('Items', !!Items);\r\n```\r\n\r\nThat works, and it prints `Items true` as excepted, but from the shell, `Items` is not defined, and I can't load `./collections.js` correct?"}}
{"actor":{"display_login":"gsabran"}}