Skip to content

Commit 7e9575c

Browse files
committed
feat: webpack 4 support.
- upgrade webpack configuration files for webpack 4 - switch to mini-css-extract-plugin, ensure hot reloading CSS still works - clean up vendor styles
1 parent 2b8a3fc commit 7e9575c

10 files changed

+3955
-1733
lines changed

client/styles.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
1-
// Include all Vendor CSS here
1+
/* Style Loader
2+
*
3+
* Anything imported in here will either be added to the vendor CSS chunk, or
4+
* the main app CSS chunk. Where they will go depends on its location or its
5+
* extension.
6+
*
7+
* Files will be added to the vendor.css chunk if:
8+
* - they are located inside `node_modules`, or
9+
* - they are plain .css files.
10+
* Otherwise, files will be added to the main app.css chunk.
11+
*/
12+
13+
// Pre-built Semantic-UI css. If you want to customize this, you can build your
14+
// own distribution of it and include it here.
15+
// See https: *semantic-ui.com/introduction/build-tools.html
216
import 'semantic-ui-css/semantic.min.css';
317

4-
// Base styles
18+
// Include initial base styles.
519
import '@css/base/index.scss';

common/css/base/_vendors.scss

Lines changed: 0 additions & 5 deletions
This file was deleted.

common/css/base/index.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
// Vendors and resource files (.e.g. variables, mixins, etc)
1+
// Resource files (.e.g. variables, mixins, etc)
22
@import '../resources/variables';
3-
@import 'vendors';
43
@import '../resources/mixins';
54

6-
// The following are non-vendor, non-resource files.
5+
// Add custom fonts, overrides, and base styles.
76
@import 'fonts';
87
@import 'overrides';
98
@import 'styles';

config/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ module.exports = {
44
enableSSR: true,
55

66
// Enable or disable dynamic imports (code splitting)
7-
enableDynamicImports: false,
7+
enableDynamicImports: true,
88

99
// The env vars to expose on the client side. If you add them here, they will
1010
// be available on the client as process.env[VAR_NAME], same as they would be
1111
// in node.js.
1212
//
1313
// **WARNING**: Be careful not to expose any secrets here!
14-
clientEnvVars: [
14+
clientEnv: [
1515
'NODE_ENV',
1616
'APPLICATION_BASE_URL'
1717
],

0 commit comments

Comments
 (0)