Title: require in sidenav's compiled module is pulling in .ts files · Issue #189 · angular/components · GitHub
Open Graph Title: require in sidenav's compiled module is pulling in .ts files · Issue #189 · angular/components
X Title: require in sidenav's compiled module is pulling in .ts files · Issue #189 · angular/components
Description: Using alpha.1 with webpack you might run into this kind of error: ERROR in ./~/@angular2-material/core/annotations/one-of.ts Module parse failed: /opt/senergy/iris-app/node_modules/@angular2-material/core/annotations/one-of.ts Line 1: Un...
Open Graph Description: Using alpha.1 with webpack you might run into this kind of error: ERROR in ./~/@angular2-material/core/annotations/one-of.ts Module parse failed: /opt/senergy/iris-app/node_modules/@angular2-materi...
X Description: Using alpha.1 with webpack you might run into this kind of error: ERROR in ./~/@angular2-material/core/annotations/one-of.ts Module parse failed: /opt/senergy/iris-app/node_modules/@angular2-materi...
Mail addresses
notifications@github.com
notifications@github.com
notifications@github.com
Opengraph URL: https://github.com/angular/components/issues/189
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"require in sidenav's compiled module is pulling in .ts files","articleBody":"Using `alpha.1` with `webpack` you might run into this kind of error:\n\n```\nERROR in ./~/@angular2-material/core/annotations/one-of.ts\nModule parse failed: /opt/senergy/iris-app/node_modules/@angular2-material/core/annotations/one-of.ts Line 1: Unexpected token\nYou may need an appropriate loader to handle this file type.\n| import {isPresent} from 'angular2/src/facade/lang';\n| \n| \n@ ./~/@angular2-material/sidenav/sidenav.js 24:15-52\n\nERROR in ./~/@angular2-material/core/rtl/dir.ts\nModule parse failed: /opt/senergy/iris-app/node_modules/@angular2-material/core/rtl/dir.ts Line 1: Unexpected token\nYou may need an appropriate loader to handle this file type.\n| import {EventEmitter} from 'angular2/src/facade/async';\n| import {Directive, HostBinding, Output, Input} from 'angular2/core';\n| import {OneOf} from '../annotations/one-of';\n @ ./~/@angular2-material/sidenav/sidenav.js 23:12-38\n```\n\nThe cause is that the compiled `sidnav.js` and `dir.js` tries to require the ts files instead of the compiled js ones. \n\n**Workaround**\nOpen `dir.js` and locate the line\n\n```\nvar one_of_1 = require('../annotations/one-of');\n```\n\n(around line 12) and add the js extension to the req'd module, so it should look like this\n\n```\nvar one_of_1 = require('../annotations/one-of.js');\n```\n\nDo the same in `sidenav.js`, i.e. make sure you have something like this around line 23-24\n\n```\nvar dir_1 = require('../core/rtl/dir.js');\nvar one_of_1 = require('../core/annotations/one-of.js');\n```\n","author":{"url":"https://github.com/aberenyi","@type":"Person","name":"aberenyi"},"datePublished":"2016-03-17T09:23:25Z","url":"https://github.com/angular/components/issues/189"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8c7d65ea-393f-4332-0afb-b276a0445151 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 840C:4BB79:A9213D:D95C96:6B00F6E2 |
| html-safe-nonce | 35b86139e25c2cee5c46ecdf67805805d8ba784e919143900019e0626f30c938 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDBDOjRCQjc5OkE5MjEzRDpEOTVDOTY6NkIwMEY2RTIiLCJ2aXNpdG9yX2lkIjoiMjMyNjI5ODYwNDUwNDkzODIxMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 939e20b823b3d25ca534bd5100d501e89bc7331b71911dab252caa871038fb80 |
| hovercard-subject-tag | issue:141526408 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/components/189/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6bc66f324d58946165b4a87a3ee446dda3d1b732e0a77b555370625093b490cc/angular/components/issues/189 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6bc66f324d58946165b4a87a3ee446dda3d1b732e0a77b555370625093b490cc/angular/components/issues/189 |
| og:image:alt | Using alpha.1 with webpack you might run into this kind of error: ERROR in ./~/@angular2-material/core/annotations/one-of.ts Module parse failed: /opt/senergy/iris-app/node_modules/@angular2-materi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | aberenyi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/components git https://github.com/angular/components.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 49016322 |
| octolytics-dimension-repository_nwo | angular/components |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49016322 |
| octolytics-dimension-repository_network_root_nwo | angular/components |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width