Skip to content

Commit 186e8fe

Browse files
committed
feat: better webpack config, layout structure, and true SSR in production
1 parent 00a0c0c commit 186e8fe

39 files changed

+635
-270
lines changed

.babelrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
],
66
"plugins": [
77
"react-hot-loader/babel",
8+
"transform-es2015-modules-commonjs",
89
"transform-class-properties",
910
"transform-decorators",
10-
"transform-object-rest-spread",
11-
["resolver", { "resolveDirs": ["common"] }]
11+
"transform-export-extensions",
12+
"transform-object-rest-spread"
1213
]
1314
}

.gitignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
npm-error.log
12
.env
23
node_modules
34
npm-debug.log*
45
.DS_Store
56

67
# ignore built static files
7-
dist/
8-
webpack-assets.json
8+
/dist
9+
/webpack-assets.json
10+
11+
# webpack-built server files
12+
server/renderer/*.built.js

common/css/_functions.scss

Lines changed: 0 additions & 1 deletion
This file was deleted.

common/css/_variables.scss

Lines changed: 0 additions & 1 deletion
This file was deleted.

common/css/base/_fonts.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Import fonts here, from google, or whereever.
2+
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,600');

common/css/base/_overrides.scss

Whitespace-only changes.

common/css/base/_styles.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
html, body {
2+
height: 100%;
3+
font-family: 'Open Sans', sans-serif;
4+
}
5+
6+
body {
7+
background-color: $white;
8+
}
9+
10+
#app {
11+
height: 100%;
12+
width: 100%;
13+
margin: 0 auto;
14+
}

common/css/base/_vendors.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Import bootstrap-sass as needed
2+
$bootstrap-sass-asset-helper: true;
3+
@import "~bootstrap-sass/assets/stylesheets/bootstrap/variables";
4+
5+
$screen-lg-min: $app-max-width !global;
6+
$container-lg: $app-max-width !global;
7+
8+
@import "~bootstrap-sass/assets/stylesheets/bootstrap/mixins";
9+
@import "~bootstrap-sass/assets/stylesheets/bootstrap/grid";

common/css/base/index.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Vendors and resource files (.e.g. variables, mixins, etc)
2+
@import '../resources/variables';
3+
@import 'vendors';
4+
@import '../resources/mixins';
5+
6+
// The following are non-vendor, non-resource files.
7+
@import 'fonts';
8+
@import 'overrides';
9+
@import 'styles';

common/css/resources/_colors.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
$white: #fff;
2+
$dark-gray: #333;

0 commit comments

Comments
 (0)