You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: readme.md
+14-17
Original file line number
Diff line number
Diff line change
@@ -110,6 +110,19 @@ To install a specific StarterKit from GitHub type:
110
110
111
111
Unlike the other editions, there were a few options added just for this edition that allow for easier upgrading, and better flexibility.
112
112
113
+
#### Custom Webpack Configuration and Merge Options
114
+
115
+
In this edition, it's important to make the configuration for webpack something very easy to update, and very easy to modify. The current setting for webpack custom configuration and merge are described [here.](https://github.com/Comcast/patternlab-edition-node-webpack/blob/master/source/_app/readme.md)
116
+
117
+
You can change how it merges by changing this object in `patternlab-config.json`:
118
+
119
+
```javascript
120
+
"webpackMerge": {
121
+
"entry": "replace"
122
+
},
123
+
```
124
+
By default merge does a `append` if that option works for you only set which webpack configuration you want to change. The merge setting is: `smartStrategy` which is documented over on this [page.](https://www.npmjs.com/package/webpack-merge#mergesmartstrategy-key-prependappendreplaceconfiguration--configuration)
125
+
113
126
#### Setting Webpack Dev Server
114
127
115
128
You can set several options to configure your dev server. You can also in the CLI pass any option on demand.
@@ -126,27 +139,13 @@ You can set several options to configure your dev server. You can also in the CL
126
139
}
127
140
},
128
141
```
129
-
130
-
#### Setting the Webpack Merge Options
131
-
132
-
In this edition, it's important to make the configuration for webpack something very easy to update, and very easy to modify. The current setting for webpack merge are described [here.](https://github.com/Comcast/patternlab-edition-node-webpack/blob/master/source/_app/readme.md)
133
-
134
-
You can change how it merges by changing this object in `patternlab-config.json`:
135
-
136
-
```javascript
137
-
"webpackMerge": {
138
-
"entry":"replace"
139
-
},
140
-
```
141
-
By default merge does a `append` if that option works for you only set which webpack configuration you want to change. The merge setting is: `smartStrategy` which is documented over on this [page.](https://www.npmjs.com/package/webpack-merge#mergesmartstrategy-key-prependappendreplaceconfiguration--configuration)
142
-
143
142
#### Modifying the compression settings for bundles
144
143
145
144
You can safely modify the following settings in the the main `webpack.babel.config` that can change how the bundles get optimized.
146
145
147
146
_Note: in webpack 4, these settings are automatically triggered when `mode=production` when running the dev server this is not used._
148
147
149
-
All uglify settings are in the`patternlab-config.json`:
148
+
All uglify settings are in the`patternlab-config.json`:
150
149
151
150
```javascript
152
151
"uglify": {
@@ -167,8 +166,6 @@ This can be changed in the`patternlab-config.json` under `app`:
167
166
"namespace":""
168
167
}
169
168
```
170
-
171
-
172
169
### Licenses
173
170
*[babel-cli](https://github.com/babel/babel/blob/master/LICENSE) - MIT
174
171
*[babel-core](https://github.com/babel/babel/blob/master/LICENSE) - MIT
Copy file name to clipboardexpand all lines: source/_app/readme.md
+5-1
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,11 @@ Used to store your app specific files.
6
6
7
7
**Custom Webpack Configuration**
8
8
9
-
`webpack.app.js` this file is used to place your custom webpack configuration. This will merge or override the values in `webpack.config.babel.js` This will provide a way to change your configuration and still get updates in the future.
9
+
The file `/source/_app/webpack.app.js` is your custom webpack configuration. This will merge or override the values in `webpack.config.babel.js`. This will provide a way to change your configuration and still get updates in the future.
10
+
11
+
**Sample Custom Configuration**
12
+
13
+
This edition includes [an example configuration](https://github.com/Comcast/patternlab-edition-node-webpack/blob/latest/source/_app/samples/scss/webpack.app.js) for loading, processing, and bundling SASS/SCSS. Use this sample as a template and modify as you like for working with any project asset-types.
0 commit comments