-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(integration): angular 5.2 + typescript 2.7 #852
Changes from 4 commits
836f282
c5c1ee6
53e421e
22c3b2c
b367d4d
1287ffa
4a4ab39
2fc6da8
59c3dfc
6199d79
dffe4c5
8bff498
c24e569
d3b0113
02d0a28
6da442e
5370634
dc7f824
74fda36
e9cc296
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { NgModule } from '@angular/core'; | ||
import { NgxsModule } from '@ngxs/store'; | ||
|
||
import { StoreModule } from './store.module'; | ||
import { AppComponent } from './app.component'; | ||
import { AppState } from './app.state'; | ||
|
||
@NgModule({ | ||
declarations: [AppComponent], | ||
imports: [BrowserModule, NgxsModule.forRoot([AppState])], | ||
imports: [BrowserModule, StoreModule], | ||
bootstrap: [AppComponent] | ||
}) | ||
export class AppModule {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { NgxsModule } from '@ngxs/store'; | ||
import { NgxsReduxDevtoolsPluginModule } from '@ngxs/devtools-plugin'; | ||
import { NgxsFormPluginModule } from '@ngxs/form-plugin'; | ||
import { NgxsLoggerPluginModule } from '@ngxs/logger-plugin'; | ||
import { NgxsStoragePluginModule } from '@ngxs/storage-plugin'; | ||
import { NgxsWebsocketPluginModule } from '@ngxs/websocket-plugin'; | ||
|
||
import { AppState } from './app.state'; | ||
|
||
@NgModule({ | ||
imports: [ | ||
NgxsModule.forRoot([AppState]), | ||
NgxsReduxDevtoolsPluginModule.forRoot(), | ||
NgxsFormPluginModule.forRoot(), | ||
NgxsLoggerPluginModule.forRoot(), | ||
NgxsStoragePluginModule.forRoot(), | ||
NgxsWebsocketPluginModule.forRoot() | ||
|
||
// TODO: error TS2315: Type 'ModuleWithProviders' is not generic. | ||
// Only support Angular 6 | ||
// NgxsRouterPluginModule.forRoot() | ||
], | ||
exports: [NgxsModule] | ||
}) | ||
export class StoreModule {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export const environment = { | ||
production: true, | ||
hmr: false | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export const environment = { | ||
production: true | ||
production: false, | ||
hmr: true | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,25 @@ | ||
import { enableProdMode } from '@angular/core'; | ||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | ||
import { BootstrapModuleFn, hmr, WebpackModule } from '@ngxs/hmr-plugin'; | ||
|
||
import { AppModule } from './app/app.module'; | ||
import { environment } from './environments/environment'; | ||
|
||
declare const module: WebpackModule; | ||
|
||
if (environment.production) { | ||
enableProdMode(); | ||
} | ||
|
||
platformBrowserDynamic() | ||
.bootstrapModule(AppModule) | ||
.catch(err => console.log(err)); | ||
const bootstrap: BootstrapModuleFn = () => platformBrowserDynamic().bootstrapModule(AppModule); | ||
|
||
if (environment.hmr) { | ||
if (module['hot']) { | ||
hmr(module, bootstrap).catch(err => console.error(err)); | ||
} else { | ||
console.error('HMR is not enabled for webpack-dev-server!'); | ||
console.log('Are you using the --hmr flag for ng serve?'); | ||
} | ||
} else { | ||
bootstrap().catch(err => console.log(err)); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
export { NgxsHmrLifeCycle, NgxsHmrOptions, NgxsHmrSnapshot } from './symbols'; | ||
export { HmrInitAction } from './actions/hmr-init.action'; | ||
export { | ||
NgxsHmrLifeCycle, | ||
NgxsHmrOptions, | ||
NgxsHmrSnapshot, | ||
WebpackModule, | ||
BootstrapModuleFn | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no, it works without, I just wanted to use the types in the example, the user may also want this |
||
} from './symbols'; | ||
export { HmrBeforeDestroyAction } from './actions/hmr-before-destroy.action'; | ||
export { hmr } from './hmr-bootstrap'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the reason for this version bump?
I had it working with 2.7.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ReactiveX/rxjs#4512 (comment)
I did the same thing, copied the directories, it did not work, I did it through the paths, but it did not work there