-
Notifications
You must be signed in to change notification settings - Fork 10
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
Route Based Code Splitting #265
Changes from 1 commit
c888286
096a1d7
9bb4009
b1ea9e3
7ad4e7e
210a982
e0a2a0d
37d7f68
047df37
eaf4aeb
17305cb
4bfec57
8f5b7c1
d1f1144
949a1dc
a1bbfb2
097fedb
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,4 +1,4 @@ | ||
import { html, LitElement } from 'lit-element'; | ||
import { html, css, LitElement } from 'lit-element'; | ||
import { connectRouter } from 'lit-redux-router'; | ||
import { applyMiddleware, createStore, compose as origCompose, combineReducers } from 'redux'; | ||
import { lazyReducerEnhancer } from 'pwa-helpers/lazy-reducer-enhancer.js'; | ||
|
@@ -23,6 +23,13 @@ connectRouter(store); | |
|
||
class AppComponent extends LitElement { | ||
|
||
static get styles() { | ||
return css` | ||
.content-outlet { | ||
min-height: 100vh | ||
}`; | ||
} | ||
|
||
async connectedCallback() { | ||
super.connectedCallback(); | ||
const route = window.location.pathname; | ||
|
@@ -97,7 +104,9 @@ class AppComponent extends LitElement { | |
return html` | ||
<div class='wrapper'> | ||
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. Seems a shame we need a custom app-template.js just for a few lines of HTML. 🤔 I wonder if we could inherit from Greenwoood's import { html } from 'lit-html';
import { AppComponent } from `@greenwood/cli/src/templates/app-component';
class GreenwoodAppComponent extends AppComponent {
render() {
return html`
<custom-code-goes-here/>
`;
}
} can probably be another issue, but would be good to play around with it now just to see what's possible, just to understand what can / can't be done. |
||
<eve-header></eve-header> | ||
MYROUTES | ||
<div class="content-outlet"> | ||
MYROUTES | ||
</div> | ||
<lit-route><h1>404 Not found</h1></lit-route> | ||
<eve-footer></eve-footer> | ||
</div> | ||
|
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.
👌