@henderea/static-site-builder 1.10.0 → 1.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -126,6 +126,14 @@ if(ssbConfig.extraLoaders && _.isArray(ssbConfig.extraLoaders)) {
126
126
  extraLoaders.push(...ssbConfig.extraLoaders);
127
127
  }
128
128
 
129
+ let postcssOptions = {
130
+ plugins: ['postcss-preset-env']
131
+ };
132
+
133
+ if(ssbConfig.postcssOptions && _.isPlainObject(ssbConfig.postcssOptions)) {
134
+ postcssOptions = ssbConfig.postcssOptions;
135
+ }
136
+
129
137
  export default _.defaultsDeep({}, ssbConfig.webpack || {}, {
130
138
  mode: 'development',
131
139
  entry: {
@@ -208,7 +216,13 @@ export default _.defaultsDeep({}, ssbConfig.webpack || {}, {
208
216
  test: /\.css$/,
209
217
  use: [
210
218
  'style-loader',
211
- 'css-loader'
219
+ 'css-loader',
220
+ {
221
+ loader: 'postcss-loader',
222
+ options: {
223
+ postcssOptions
224
+ }
225
+ }
212
226
  ]
213
227
  },
214
228
  {
@@ -216,6 +230,12 @@ export default _.defaultsDeep({}, ssbConfig.webpack || {}, {
216
230
  use: [
217
231
  'style-loader',
218
232
  'css-loader',
233
+ {
234
+ loader: 'postcss-loader',
235
+ options: {
236
+ postcssOptions
237
+ }
238
+ },
219
239
  'sass-loader'
220
240
  ]
221
241
  },
@@ -234,6 +234,14 @@ if(ssbConfig.extraLoaders && _.isArray(ssbConfig.extraLoaders)) {
234
234
  extraLoaders.push(...ssbConfig.extraLoaders);
235
235
  }
236
236
 
237
+ let postcssOptions = {
238
+ plugins: ['postcss-preset-env']
239
+ };
240
+
241
+ if(ssbConfig.postcssOptions && _.isPlainObject(ssbConfig.postcssOptions)) {
242
+ postcssOptions = ssbConfig.postcssOptions;
243
+ }
244
+
237
245
  export default _.defaultsDeep({}, ssbConfig.webpack || {}, {
238
246
  mode: 'production',
239
247
  entry: {
@@ -335,9 +343,7 @@ export default _.defaultsDeep({}, ssbConfig.webpack || {}, {
335
343
  {
336
344
  loader: 'postcss-loader',
337
345
  options: {
338
- postcssOptions: {
339
- plugins: ['postcss-preset-env']
340
- },
346
+ postcssOptions,
341
347
  sourceMap: true
342
348
  }
343
349
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henderea/static-site-builder",
3
- "version": "1.10.0",
3
+ "version": "1.10.1",
4
4
  "description": "A static site builder",
5
5
  "main": "index.js",
6
6
  "repository": "henderea/static-site-builder.git",