@digest/webpack 4.6.0-next.1 → 4.6.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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const scripts_1 = require("@digest/scripts");
7
+ const mini_css_extract_plugin_1 = __importDefault(require("mini-css-extract-plugin"));
8
+ const threadLoader = require('./threadLoader');
9
+ const configuration = require('./webpack.config');
10
+ const styleLoaders = (options = {}) => {
11
+ options.camelCase = options.camelCase === undefined ?
12
+ true :
13
+ options.camelCase;
14
+ return [].concat(scripts_1.production ?
15
+ [
16
+ {
17
+ loader: mini_css_extract_plugin_1.default.loader,
18
+ options: {
19
+ publicPath: '../'
20
+ }
21
+ }
22
+ ] :
23
+ [
24
+ threadLoader,
25
+ {
26
+ loader: 'style-loader'
27
+ }
28
+ ], [
29
+ {
30
+ loader: 'css-loader',
31
+ options: {
32
+ importLoaders: 1,
33
+ modules: options.modules ?
34
+ {
35
+ exportLocalsConvention: options.camelCase ?
36
+ 'camelCase' :
37
+ 'asIs',
38
+ localIdentName: scripts_1.config.library ?
39
+ `${scripts_1.config.shortName}-[local]` :
40
+ `[local]-[hash:${scripts_1.config.hashLimit}]`
41
+ } :
42
+ undefined,
43
+ sourceMap: options.sourceMap
44
+ }
45
+ }
46
+ ], options.postcss ?
47
+ [
48
+ {
49
+ loader: 'postcss-loader',
50
+ options: {
51
+ postcssOptions: {
52
+ ctx: {},
53
+ path: scripts_1.config.webpackPostCSS
54
+ },
55
+ sourceMap: options.sourceMap
56
+ }
57
+ }
58
+ ] :
59
+ []);
60
+ };
61
+ module.exports = styleLoaders;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@digest/webpack",
3
3
  "title": "Webpack Digest",
4
4
  "license": "LGPL-3.0-or-later",
5
- "version": "4.6.0-next.1",
5
+ "version": "4.6.1",
6
6
  "description": "Digested Webpack Configurations",
7
7
  "author": {
8
8
  "name": "wallzero @wallzeroblog",
@@ -28,10 +28,8 @@
28
28
  "files": [
29
29
  "/dist/scriptLoaders.d.ts",
30
30
  "/dist/scriptLoaders.js",
31
- "/dist/styleLoaders/index.d.ts",
32
- "/dist/styleLoaders/index.js",
33
- "/dist/styleLoaders/insert-function.d.ts",
34
- "/dist/styleLoaders/insert-function.js",
31
+ "/dist/styleLoaders.d.ts",
32
+ "/dist/styleLoaders.js",
35
33
  "/dist/threadLoader.d.ts",
36
34
  "/dist/threadLoader.js",
37
35
  "/dist/webpack.config.d.ts",
@@ -95,5 +93,5 @@
95
93
  "build",
96
94
  "hmr"
97
95
  ],
98
- "gitHead": "6c5ebfa7cf24c53ade7b7d806cef6f9e81586da2"
96
+ "gitHead": "c2b4dd69ea7244c4c8aebedefdf51689e3ea74f7"
99
97
  }