@best-shot/preset-style 0.12.6 → 0.12.7

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.
@@ -33,30 +33,6 @@ export async function applyStylesheet(chain) {
33
33
  const watch = chain.get('watch');
34
34
  const hot = chain.devServer.get('hot') || false;
35
35
 
36
- chain.module
37
- .rule('style')
38
- .rule('all')
39
- .oneOf('url')
40
- .dependency('url')
41
- .generator.filename('[contenthash].css');
42
-
43
- const parent = chain.module.rule('style').rule('all').oneOf('not-url');
44
-
45
- parent
46
- .use('css-loader')
47
- .loader('css-loader')
48
- .options({
49
- importLoaders: 3,
50
- modules: {
51
- auto,
52
- exportLocalsConvention: 'camel-case-only',
53
- localIdentName: {
54
- development: '[name]_[local]-[hash]',
55
- production: '[local]-[hash]',
56
- }[mode],
57
- },
58
- });
59
-
60
36
  chain.module
61
37
  .rule('style')
62
38
  .rule('postcss')
@@ -68,6 +44,15 @@ export async function applyStylesheet(chain) {
68
44
  },
69
45
  });
70
46
 
47
+ chain.module
48
+ .rule('style')
49
+ .rule('all')
50
+ .oneOf('url')
51
+ .dependency('url')
52
+ .generator.filename('[contenthash].css');
53
+
54
+ const parent = chain.module.rule('style').rule('all').oneOf('not-url');
55
+
71
56
  if (hot) {
72
57
  parent.use('style-loader').loader('style-loader');
73
58
  } else {
@@ -99,4 +84,19 @@ export async function applyStylesheet(chain) {
99
84
  .exclude.add(slashToRegexp('/node_modules/mini-css-extract-plugin/'));
100
85
  }
101
86
  }
87
+
88
+ parent
89
+ .use('css-loader')
90
+ .loader('css-loader')
91
+ .options({
92
+ importLoaders: 3,
93
+ modules: {
94
+ auto,
95
+ exportLocalsConvention: 'camel-case-only',
96
+ localIdentName: {
97
+ development: '[name]_[local]-[hash]',
98
+ production: '[local]-[hash]',
99
+ }[mode],
100
+ },
101
+ });
102
102
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@best-shot/preset-style",
3
- "version": "0.12.6",
3
+ "version": "0.12.7",
4
4
  "description": "A `best-shot` preset for stylesheet",
5
5
  "license": "MIT",
6
6
  "author": {