{"action":"created","issue":{"url":"https://api.github.com/repos/aurelia/bundler/issues/131","repository_url":"https://api.github.com/repos/aurelia/bundler","labels_url":"https://api.github.com/repos/aurelia/bundler/issues/131/labels{/name}","comments_url":"https://api.github.com/repos/aurelia/bundler/issues/131/comments","events_url":"https://api.github.com/repos/aurelia/bundler/issues/131/events","html_url":"https://github.com/aurelia/bundler/issues/131","id":163231527,"number":131,"title":"Aurelia-Bundler won't fetch sub-directory imports from main.js. ","user":{"login":"allencoded","id":5386804,"avatar_url":"https://avatars.githubusercontent.com/u/5386804?v=3","gravatar_id":"","url":"https://api.github.com/users/allencoded","html_url":"https://github.com/allencoded","followers_url":"https://api.github.com/users/allencoded/followers","following_url":"https://api.github.com/users/allencoded/following{/other_user}","gists_url":"https://api.github.com/users/allencoded/gists{/gist_id}","starred_url":"https://api.github.com/users/allencoded/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allencoded/subscriptions","organizations_url":"https://api.github.com/users/allencoded/orgs","repos_url":"https://api.github.com/users/allencoded/repos","events_url":"https://api.github.com/users/allencoded/events{/privacy}","received_events_url":"https://api.github.com/users/allencoded/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-06-30T18:21:49Z","updated_at":"2016-06-30T20:39:27Z","closed_at":"2016-06-30T18:25:58Z","body":"Aurelia-Bundler won't grab sub directory imports from main.js. I am not sure how to fix here is what we have:\r\n\r\n**/src/main.js**\r\n```\r\nimport { HttpClient } from 'aurelia-fetch-client';\r\nimport { UserManager, Log, WebStorageStateStore } from 'oidc-client';\r\nimport { AppConfig } from './config/app-config';\r\nimport bootstrap from \"bootstrap\";\r\nimport 'babel-polyfill';\r\n...\r\n```\r\n\r\n**bundles.js**\r\n```\r\nmodule.exports = {\r\n  \"bundles\": {\r\n    \"dist/app-build\": {\r\n      \"includes\": [\r\n        \"[main.js]\",\r\n        \"[*/**/*.js]\",\r\n        \"*/**/*.html!text\",\r\n        \"*/**/*.css!text\"\r\n      ],\r\n```\r\n\r\n**error:**\r\n```\r\nsystem.js:4 GET http://localhost:3001/config/app-config.js 404 (Not Found)\r\n```\r\n\r\n\r\nSo what I am doing is:\r\n`gulp export`\r\nThen after it exports completely I `cd` into the created exports folder. Then I do `http-server -p 3001`. Launch the browser and get the error above. Something with main.js importing our own js from within a subdirectory doesn't work.\r\n\r\nI am howerver able to:\r\n`gulp watch`  \r\njust fine. Its only when I try to bundle with `gulp export` that it breaks. I think the bundler has a problem or my setup is funky. "},"comment":{"url":"https://api.github.com/repos/aurelia/bundler/issues/comments/229781962","html_url":"https://github.com/aurelia/bundler/issues/131#issuecomment-229781962","issue_url":"https://api.github.com/repos/aurelia/bundler/issues/131","id":229781962,"user":{"login":"allencoded","id":5386804,"avatar_url":"https://avatars.githubusercontent.com/u/5386804?v=3","gravatar_id":"","url":"https://api.github.com/users/allencoded","html_url":"https://github.com/allencoded","followers_url":"https://api.github.com/users/allencoded/followers","following_url":"https://api.github.com/users/allencoded/following{/other_user}","gists_url":"https://api.github.com/users/allencoded/gists{/gist_id}","starred_url":"https://api.github.com/users/allencoded/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allencoded/subscriptions","organizations_url":"https://api.github.com/users/allencoded/orgs","repos_url":"https://api.github.com/users/allencoded/repos","events_url":"https://api.github.com/users/allencoded/events{/privacy}","received_events_url":"https://api.github.com/users/allencoded/received_events","type":"User","site_admin":false},"created_at":"2016-06-30T20:39:27Z","updated_at":"2016-06-30T20:39:27Z","body":"Bundles.js:\r\n```\r\nmodule.exports = {\r\n  \"bundles\": {\r\n    \"dist/app-build\": {\r\n      \"includes\": [\r\n        \"[**/*.js]\",\r\n        \"**/*.html!text\",\r\n        \"**/*.css!text\"\r\n      ],\r\n      \"options\": {\r\n        \"inject\": true,\r\n        \"minify\": true,\r\n        \"depCache\": true,\r\n        \"rev\": false\r\n      }\r\n    },\r\n    \"dist/aurelia\": {\r\n      \"includes\": [\r\n        \"aurelia-framework\",\r\n        \"aurelia-bootstrapper\",\r\n        \"aurelia-fetch-client\",\r\n        \"aurelia-router\",\r\n        \"aurelia-animator-css\",\r\n        \"aurelia-templating-binding\",\r\n        \"aurelia-polyfills\",\r\n        \"aurelia-templating-resources\",\r\n        \"aurelia-templating-router\",\r\n        \"aurelia-loader-default\",\r\n        \"aurelia-history-browser\",\r\n        \"aurelia-logging-console\",\r\n        \"bootstrap\",\r\n        \"bootstrap/css/bootstrap.css!text\",\r\n        \"fetch\",\r\n        \"jquery\",\r\n        \"oidc-client\",\r\n        \"babel-polyfill\",\r\n        \"moment\",\r\n        \"github:systemjs/plugin-json@0.1.2\",\r\n        \"core-js\",\r\n        \"bluebird\"\r\n      ],\r\n      \"options\": {\r\n        \"inject\": true,\r\n        \"minify\": true,\r\n        \"depCache\": false,\r\n        \"rev\": false\r\n      }\r\n    }\r\n  }\r\n};\r\n```\r\n\r\nexport.js\r\n```\r\n// this file provides a list of unbundled files that\r\n// need to be included when exporting the application\r\n// for production.\r\nmodule.exports = {\r\n  'list': [\r\n    'index.html',\r\n    'config.js',\r\n    'favicon.ico',\r\n    'LICENSE',\r\n    'jspm_packages/system.js',\r\n    'jspm_packages/system-polyfills.js',\r\n    'jspm_packages/system-csp-production.js',\r\n    'dist/css/**/*.css',\r\n    'dist/environment.json'\r\n  ],\r\n  // this section lists any jspm packages that have\r\n  // unbundled resources that need to be exported.\r\n  // these files are in versioned folders and thus\r\n  // must be 'normalized' by jspm to get the proper\r\n  // path.\r\n  'normalize': [\r\n    [\r\n      // include font-awesome.css and its fonts files\r\n      'font-awesome', [\r\n        '/css/font-awesome.min.css',\r\n        '/fonts/*'\r\n      ]\r\n    ], [\r\n      // include bootstrap's font files\r\n      'bootstrap', [\r\n        '/fonts/*'\r\n      ]\r\n    ],\r\n  ]\r\n};\r\n```\r\n\r\nIndex.html:\r\n```\r\n    <script src=\"jspm_packages/system.js\"></script>\r\n    <script src=\"config.js\"></script>\r\n    <script>\r\n      System.import('core-js').then(function() {\r\n        System.import('aurelia-bootstrapper');\r\n      });\r\n    </script>\r\n```\r\n\r\nMain.js\r\n```\r\nimport { HttpClient } from 'aurelia-fetch-client';\r\nimport { UserManager, Log, WebStorageStateStore } from 'oidc-client';\r\nimport { AppConfig } from './config/app-config'; // <-- THESE Aren't Working via aurelia-bundler!\r\nimport bootstrap from \"bootstrap\";\r\nimport 'babel-polyfill';\r\nimport 'fetch';\r\nimport 'bluebird';\r\n...\r\n```"}}
{"actor":{"display_login":"allencoded"}}