Skip to content

Commit 59aa990

Browse files
author
Bulfair, Matt
committed
update to readme with new features
1 parent 960ba50 commit 59aa990

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

readme.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,37 @@ You can change how it merges by changing this object in `patternlab-config.json`
138138
"entry": "replace"
139139
},
140140
```
141-
142141
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)
143142

143+
#### Modifying the compression settings for bundles
144+
145+
You can safely modify the following settings in the the main `webpack.babel.config` that can change how the bundles get optimized.
146+
147+
_Note: in webpack 4, these settings are automatically triggered when `mode=production` when running the dev server this is not used._
148+
149+
All uglify settings are in the`patternlab-config.json`:
150+
151+
```javascript
152+
"uglify": {
153+
"sourceMap": false,
154+
"parallel": true,
155+
"uglifyOptions": {
156+
"mangle": false
157+
}
158+
},
159+
```
160+
#### Namespace
161+
In some cases you may want to add a namespace to your JS or CSS/SCSS files. You can now add a global `NAMESPACE` which can be read by any JS module. The sample of .scss includes how to use it in a `.SCSS` file.
162+
163+
This can be changed in the`patternlab-config.json` under `app`:
164+
165+
```javascript
166+
"app": {
167+
"namespace": ""
168+
}
169+
```
170+
171+
144172
### Licenses
145173
* [babel-cli](https://github.com/babel/babel/blob/master/LICENSE) - MIT
146174
* [babel-core](https://github.com/babel/babel/blob/master/LICENSE) - MIT

0 commit comments

Comments
 (0)