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
+29-1Lines changed: 29 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -138,9 +138,37 @@ You can change how it merges by changing this object in `patternlab-config.json`
138
138
"entry":"replace"
139
139
},
140
140
```
141
-
142
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)
143
142
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
+
144
172
### Licenses
145
173
*[babel-cli](https://github.com/babel/babel/blob/master/LICENSE) - MIT
146
174
*[babel-core](https://github.com/babel/babel/blob/master/LICENSE) - MIT
0 commit comments