css-loader 1.0.1 → 2.1.0

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,155 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _postcss = _interopRequireDefault(require("postcss"));
9
+
10
+ var _postcssValueParser = _interopRequireDefault(require("postcss-value-parser"));
11
+
12
+ var _lodash = _interopRequireDefault(require("lodash"));
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+
16
+ const pluginName = 'postcss-url-parser';
17
+ const isUrlFunc = /url/i;
18
+ const isImageSetFunc = /^(?:-webkit-)?image-set$/i;
19
+ const needParseDecl = /(?:url|(?:-webkit-)?image-set)\(/i;
20
+
21
+ function getNodeFromUrlFunc(node) {
22
+ return node.nodes && node.nodes[0];
23
+ }
24
+
25
+ function getUrlFromUrlFunc(node) {
26
+ return node.nodes.length !== 0 && node.nodes[0].type === 'string' ? node.nodes[0].value : _postcssValueParser.default.stringify(node.nodes);
27
+ }
28
+
29
+ function walkUrls(parsed, callback) {
30
+ parsed.walk(node => {
31
+ if (node.type !== 'function') {
32
+ return;
33
+ }
34
+
35
+ if (isUrlFunc.test(node.value)) {
36
+ callback(getNodeFromUrlFunc(node), getUrlFromUrlFunc(node), false); // Do not traverse inside `url`
37
+ // eslint-disable-next-line consistent-return
38
+
39
+ return false;
40
+ }
41
+
42
+ if (isImageSetFunc.test(node.value)) {
43
+ node.nodes.forEach(nNode => {
44
+ if (nNode.type === 'function' && isUrlFunc.test(nNode.value)) {
45
+ callback(getNodeFromUrlFunc(nNode), getUrlFromUrlFunc(nNode), false);
46
+ }
47
+
48
+ if (nNode.type === 'string') {
49
+ callback(nNode, nNode.value, true);
50
+ }
51
+ }); // Do not traverse inside `image-set`
52
+ // eslint-disable-next-line consistent-return
53
+
54
+ return false;
55
+ }
56
+ });
57
+ }
58
+
59
+ function walkDeclsWithUrl(css, result, filter) {
60
+ const items = [];
61
+ css.walkDecls(decl => {
62
+ if (!needParseDecl.test(decl.value)) {
63
+ return;
64
+ }
65
+
66
+ const parsed = (0, _postcssValueParser.default)(decl.value);
67
+ const urls = [];
68
+ walkUrls(parsed, (node, url, needQuotes) => {
69
+ if (url.trim().replace(/\\[\r\n]/g, '').length === 0) {
70
+ result.warn(`Unable to find uri in '${decl.toString()}'`, {
71
+ node: decl
72
+ });
73
+ return;
74
+ }
75
+
76
+ if (filter && !filter(url)) {
77
+ return;
78
+ }
79
+
80
+ urls.push({
81
+ url,
82
+ needQuotes
83
+ });
84
+ });
85
+
86
+ if (urls.length === 0) {
87
+ return;
88
+ }
89
+
90
+ items.push({
91
+ decl,
92
+ parsed,
93
+ urls
94
+ });
95
+ });
96
+ return items;
97
+ }
98
+
99
+ var _default = _postcss.default.plugin(pluginName, (options = {}) => function process(css, result) {
100
+ const traversed = walkDeclsWithUrl(css, result, options.filter);
101
+
102
+ const paths = _lodash.default.uniqWith(_lodash.default.flatten(traversed.map(item => item.urls)), _lodash.default.isEqual);
103
+
104
+ if (paths.length === 0) {
105
+ return;
106
+ }
107
+
108
+ const placeholders = [];
109
+ paths.forEach((path, index) => {
110
+ const placeholder = `___CSS_LOADER_URL___${index}___`;
111
+ const {
112
+ url,
113
+ needQuotes
114
+ } = path;
115
+ placeholders.push({
116
+ placeholder,
117
+ path
118
+ });
119
+ result.messages.push({
120
+ pluginName,
121
+ type: 'url',
122
+ item: {
123
+ url,
124
+ placeholder,
125
+ needQuotes
126
+ }
127
+ });
128
+ });
129
+ traversed.forEach(item => {
130
+ walkUrls(item.parsed, (node, url, needQuotes) => {
131
+ const value = _lodash.default.find(placeholders, {
132
+ path: {
133
+ url,
134
+ needQuotes
135
+ }
136
+ });
137
+
138
+ if (!value) {
139
+ return;
140
+ }
141
+
142
+ const {
143
+ placeholder
144
+ } = value; // eslint-disable-next-line no-param-reassign
145
+
146
+ node.type = 'word'; // eslint-disable-next-line no-param-reassign
147
+
148
+ node.value = placeholder;
149
+ }); // eslint-disable-next-line no-param-reassign
150
+
151
+ item.decl.value = item.parsed.toString();
152
+ });
153
+ });
154
+
155
+ exports.default = _default;
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+
3
+ /*
4
+ MIT License http://www.opensource.org/licenses/mit-license.php
5
+ Author Tobias Koppers @sokra
6
+ */
7
+ // css base code, injected by the css-loader
8
+ module.exports = function (useSourceMap) {
9
+ var list = []; // return the list of modules as css string
10
+
11
+ list.toString = function toString() {
12
+ return this.map(function (item) {
13
+ var content = cssWithMappingToString(item, useSourceMap);
14
+
15
+ if (item[2]) {
16
+ return '@media ' + item[2] + '{' + content + '}';
17
+ } else {
18
+ return content;
19
+ }
20
+ }).join('');
21
+ }; // import a list of modules into the list
22
+
23
+
24
+ list.i = function (modules, mediaQuery) {
25
+ if (typeof modules === 'string') {
26
+ modules = [[null, modules, '']];
27
+ }
28
+
29
+ var alreadyImportedModules = {};
30
+
31
+ for (var i = 0; i < this.length; i++) {
32
+ var id = this[i][0];
33
+
34
+ if (id != null) {
35
+ alreadyImportedModules[id] = true;
36
+ }
37
+ }
38
+
39
+ for (i = 0; i < modules.length; i++) {
40
+ var item = modules[i]; // skip already imported module
41
+ // this implementation is not 100% perfect for weird media query combinations
42
+ // when a module is imported multiple times with different media queries.
43
+ // I hope this will never occur (Hey this way we have smaller bundles)
44
+
45
+ if (item[0] == null || !alreadyImportedModules[item[0]]) {
46
+ if (mediaQuery && !item[2]) {
47
+ item[2] = mediaQuery;
48
+ } else if (mediaQuery) {
49
+ item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';
50
+ }
51
+
52
+ list.push(item);
53
+ }
54
+ }
55
+ };
56
+
57
+ return list;
58
+ };
59
+
60
+ function cssWithMappingToString(item, useSourceMap) {
61
+ var content = item[1] || '';
62
+ var cssMapping = item[3];
63
+
64
+ if (!cssMapping) {
65
+ return content;
66
+ }
67
+
68
+ if (useSourceMap && typeof btoa === 'function') {
69
+ var sourceMapping = toComment(cssMapping);
70
+ var sourceURLs = cssMapping.sources.map(function (source) {
71
+ return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';
72
+ });
73
+ return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
74
+ }
75
+
76
+ return [content].join('\n');
77
+ } // Adapted from convert-source-map (MIT)
78
+
79
+
80
+ function toComment(sourceMap) {
81
+ // eslint-disable-next-line no-undef
82
+ var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
83
+ var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
84
+ return '/*# ' + data + ' */';
85
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ module.exports = function escape(url, needQuotes) {
4
+ if (typeof url !== 'string') {
5
+ return url;
6
+ } // If url is already wrapped in quotes, remove them
7
+
8
+
9
+ if (/^['"].*['"]$/.test(url)) {
10
+ url = url.slice(1, -1);
11
+ } // Should url be wrapped?
12
+ // See https://drafts.csswg.org/css-values-3/#urls
13
+
14
+
15
+ if (/["'() \t\n]/.test(url) || needQuotes) {
16
+ return '"' + url.replace(/"/g, '\\"').replace(/\n/g, '\\n') + '"';
17
+ }
18
+
19
+ return url;
20
+ };
package/dist/utils.js ADDED
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getImportPrefix = getImportPrefix;
7
+ exports.getLocalIdent = getLocalIdent;
8
+ exports.dashesCamelCase = dashesCamelCase;
9
+ exports.getFilter = getFilter;
10
+ exports.placholderRegExps = void 0;
11
+
12
+ var _path = _interopRequireDefault(require("path"));
13
+
14
+ var _loaderUtils = _interopRequireDefault(require("loader-utils"));
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
+
18
+ /*
19
+ MIT License http://www.opensource.org/licenses/mit-license.php
20
+ Author Tobias Koppers @sokra
21
+ */
22
+ const placholderRegExps = {
23
+ importItemG: /___CSS_LOADER_IMPORT___([0-9]+)___/g,
24
+ importItem: /___CSS_LOADER_IMPORT___([0-9]+)___/
25
+ };
26
+ exports.placholderRegExps = placholderRegExps;
27
+
28
+ function getImportPrefix(loaderContext, importLoaders) {
29
+ if (importLoaders === false) {
30
+ return '';
31
+ }
32
+
33
+ const numberImportedLoaders = parseInt(importLoaders, 10) || 0;
34
+ const loadersRequest = loaderContext.loaders.slice(loaderContext.loaderIndex, loaderContext.loaderIndex + 1 + numberImportedLoaders).map(x => x.request).join('!');
35
+ return `-!${loadersRequest}!`;
36
+ }
37
+
38
+ function dashesCamelCase(str) {
39
+ return str.replace(/-+(\w)/g, (match, firstLetter) => firstLetter.toUpperCase());
40
+ }
41
+
42
+ function getLocalIdent(loaderContext, localIdentName, localName, options) {
43
+ if (!options.context) {
44
+ // eslint-disable-next-line no-param-reassign
45
+ options.context = loaderContext.rootContext;
46
+ }
47
+
48
+ const request = _path.default.relative(options.context, loaderContext.resourcePath).replace(/\\/g, '/'); // eslint-disable-next-line no-param-reassign
49
+
50
+
51
+ options.content = `${options.hashPrefix + request}+${localName}`; // eslint-disable-next-line no-param-reassign
52
+
53
+ localIdentName = localIdentName.replace(/\[local\]/gi, localName);
54
+
55
+ const hash = _loaderUtils.default.interpolateName(loaderContext, localIdentName, options);
56
+
57
+ return hash.replace(new RegExp('[^a-zA-Z0-9\\-_\u00A0-\uFFFF]', 'g'), '-').replace(/^((-?[0-9])|--)/, '_$1');
58
+ }
59
+
60
+ function getFilter(filter, resourcePath, defaultFilter = null) {
61
+ return content => {
62
+ if (defaultFilter && !defaultFilter(content)) {
63
+ return false;
64
+ }
65
+
66
+ if (typeof filter === 'function') {
67
+ return !filter(content, resourcePath);
68
+ }
69
+
70
+ return true;
71
+ };
72
+ }
package/package.json CHANGED
@@ -1,52 +1,121 @@
1
1
  {
2
2
  "name": "css-loader",
3
- "version": "1.0.1",
4
- "author": "Tobias Koppers @sokra",
5
- "license": "MIT",
3
+ "version": "2.1.0",
6
4
  "description": "css loader module for webpack",
5
+ "license": "MIT",
6
+ "repository": "webpack-contrib/css-loader",
7
+ "author": "Tobias Koppers @sokra",
8
+ "homepage": "https://github.com/webpack-contrib/css-loader",
9
+ "bugs": "https://github.com/webpack-contrib/css-loader/issues",
10
+ "main": "dist/cjs.js",
7
11
  "engines": {
8
- "node": ">= 6.9.0 <7.0.0 || >= 8.9.0"
12
+ "node": ">= 6.9.0"
13
+ },
14
+ "scripts": {
15
+ "start": "npm run build -- -w",
16
+ "build": "cross-env NODE_ENV=production babel src -d dist --ignore 'src/**/*.test.js' --copy-files",
17
+ "clean": "del-cli dist",
18
+ "commitlint": "commitlint",
19
+ "commitmsg": "commitlint -e $GIT_PARAMS",
20
+ "lint": "eslint --cache src test",
21
+ "prebuild": "npm run clean",
22
+ "prepublish": "npm run build",
23
+ "release": "standard-version",
24
+ "security": "npm audit",
25
+ "test": "jest",
26
+ "test:watch": "jest --watch",
27
+ "test:coverage": "jest --collectCoverageFrom='src/**/*.js' --coverage",
28
+ "ci:lint": "npm run lint && npm run security",
29
+ "ci:test": "npm run test -- --runInBand",
30
+ "ci:coverage": "npm run test:coverage -- --runInBand",
31
+ "ci:lint:commits": "commitlint --from=origin/master --to=${CIRCLE_SHA1}",
32
+ "defaults": "webpack-defaults"
9
33
  },
10
34
  "files": [
11
- "lib",
12
- "index.js",
13
- "locals.js"
35
+ "dist/",
36
+ "lib/",
37
+ "index.js"
14
38
  ],
39
+ "peerDependencies": {
40
+ "webpack": "^4.0.0"
41
+ },
15
42
  "dependencies": {
16
- "babel-code-frame": "^6.26.0",
17
- "css-selector-tokenizer": "^0.7.0",
18
- "icss-utils": "^2.1.0",
19
- "loader-utils": "^1.0.2",
43
+ "icss-utils": "^4.0.0",
44
+ "loader-utils": "^1.2.1",
20
45
  "lodash": "^4.17.11",
21
- "postcss": "^6.0.23",
22
- "postcss-modules-extract-imports": "^1.2.0",
23
- "postcss-modules-local-by-default": "^1.2.0",
24
- "postcss-modules-scope": "^1.1.0",
25
- "postcss-modules-values": "^1.3.0",
46
+ "postcss": "^7.0.6",
47
+ "postcss-modules-extract-imports": "^2.0.0",
48
+ "postcss-modules-local-by-default": "^2.0.3",
49
+ "postcss-modules-scope": "^2.0.0",
50
+ "postcss-modules-values": "^2.0.0",
26
51
  "postcss-value-parser": "^3.3.0",
27
- "source-list-map": "^2.0.0"
52
+ "schema-utils": "^1.0.0"
28
53
  },
29
54
  "devDependencies": {
30
- "codecov": "^1.0.1",
31
- "eslint": "3.14.0",
32
- "istanbul": "^0.4.5",
33
- "mocha": "^3.2.0",
34
- "should": "^11.1.2",
35
- "standard-version": "^4.0.0"
55
+ "@babel/cli": "^7.1.5",
56
+ "@babel/core": "^7.1.6",
57
+ "@babel/polyfill": "^7.0.0",
58
+ "@babel/preset-env": "^7.1.6",
59
+ "@commitlint/cli": "^7.2.1",
60
+ "@commitlint/config-conventional": "^7.1.2",
61
+ "@webpack-contrib/defaults": "^3.0.0",
62
+ "@webpack-contrib/eslint-config-webpack": "^3.0.0",
63
+ "babel-core": "^7.0.0-bridge.0",
64
+ "babel-jest": "^23.6.0",
65
+ "cross-env": "^5.2.0",
66
+ "del": "^3.0.0",
67
+ "del-cli": "^1.1.0",
68
+ "eslint": "^5.9.0",
69
+ "eslint-plugin-import": "^2.14.0",
70
+ "eslint-plugin-prettier": "^3.0.0",
71
+ "file-loader": "^3.0.1",
72
+ "husky": "^1.2.0",
73
+ "jest": "^23.6.0",
74
+ "lint-staged": "^8.1.0",
75
+ "memory-fs": "^0.4.1",
76
+ "postcss-loader": "^3.0.0",
77
+ "postcss-preset-env": "^6.4.0",
78
+ "prettier": "^1.15.2",
79
+ "sass": "^1.15.1",
80
+ "sass-loader": "^7.1.0",
81
+ "standard-version": "^4.0.0",
82
+ "strip-ansi": "^5.0.0",
83
+ "webpack": "^4.26.1"
36
84
  },
37
- "peerDependencies": {
38
- "webpack": "^4.0.0"
85
+ "keywords": [
86
+ "webpack",
87
+ "css",
88
+ "loader",
89
+ "url",
90
+ "import"
91
+ ],
92
+ "babel": {
93
+ "presets": [
94
+ [
95
+ "@babel/preset-env",
96
+ {
97
+ "targets": {
98
+ "node": "6.9.0"
99
+ },
100
+ "useBuiltIns": "usage"
101
+ }
102
+ ]
103
+ ]
39
104
  },
40
- "scripts": {
41
- "lint": "eslint lib test",
42
- "test": "mocha",
43
- "cover": "istanbul cover node_modules/mocha/bin/_mocha",
44
- "test:cover": "npm run cover -- --report lcovonly",
45
- "travis:test": "npm run cover",
46
- "travis:lint": "npm run lint",
47
- "release": "standard-version"
105
+ "husky": {
106
+ "hooks": {
107
+ "pre-commit": "lint-staged"
108
+ }
48
109
  },
49
- "homepage": "https://github.com/webpack-contrib/css-loader",
50
- "repository": "https://github.com/webpack-contrib/css-loader.git",
51
- "bugs": "https://github.com/webpack-contrib/css-loader/issues"
110
+ "lint-staged": {
111
+ "*.js": [
112
+ "eslint --fix",
113
+ "git add"
114
+ ]
115
+ },
116
+ "commitlint": {
117
+ "extends": [
118
+ "@commitlint/config-conventional"
119
+ ]
120
+ }
52
121
  }
package/index.js DELETED
@@ -1,5 +0,0 @@
1
- /*
2
- MIT License http://www.opensource.org/licenses/mit-license.php
3
- Author Tobias Koppers @sokra
4
- */
5
- module.exports = require("./lib/loader");
@@ -1,51 +0,0 @@
1
- var camelCase = require("lodash/camelCase");
2
-
3
- function dashesCamelCase(str) {
4
- return str.replace(/-+(\w)/g, function(match, firstLetter) {
5
- return firstLetter.toUpperCase();
6
- });
7
- }
8
-
9
- module.exports = function compileExports(result, importItemMatcher, camelCaseKeys) {
10
- if (!Object.keys(result.exports).length) {
11
- return "";
12
- }
13
-
14
- var exportJs = Object.keys(result.exports).reduce(function(res, key) {
15
- var valueAsString = JSON.stringify(result.exports[key]);
16
- valueAsString = valueAsString.replace(result.importItemRegExpG, importItemMatcher);
17
- function addEntry(k) {
18
- res.push("\t" + JSON.stringify(k) + ": " + valueAsString);
19
- }
20
-
21
- var targetKey;
22
- switch(camelCaseKeys) {
23
- case true:
24
- addEntry(key);
25
- targetKey = camelCase(key);
26
- if (targetKey !== key) {
27
- addEntry(targetKey);
28
- }
29
- break;
30
- case 'dashes':
31
- addEntry(key);
32
- targetKey = dashesCamelCase(key);
33
- if (targetKey !== key) {
34
- addEntry(targetKey);
35
- }
36
- break;
37
- case 'only':
38
- addEntry(camelCase(key));
39
- break;
40
- case 'dashesOnly':
41
- addEntry(dashesCamelCase(key));
42
- break;
43
- default:
44
- addEntry(key);
45
- break;
46
- }
47
- return res;
48
- }, []).join(",\n");
49
-
50
- return "{\n" + exportJs + "\n}";
51
- };
package/lib/css-base.js DELETED
@@ -1,76 +0,0 @@
1
- /*
2
- MIT License http://www.opensource.org/licenses/mit-license.php
3
- Author Tobias Koppers @sokra
4
- */
5
- // css base code, injected by the css-loader
6
- module.exports = function(useSourceMap) {
7
- var list = [];
8
-
9
- // return the list of modules as css string
10
- list.toString = function toString() {
11
- return this.map(function (item) {
12
- var content = cssWithMappingToString(item, useSourceMap);
13
- if(item[2]) {
14
- return "@media " + item[2] + "{" + content + "}";
15
- } else {
16
- return content;
17
- }
18
- }).join("");
19
- };
20
-
21
- // import a list of modules into the list
22
- list.i = function(modules, mediaQuery) {
23
- if(typeof modules === "string")
24
- modules = [[null, modules, ""]];
25
- var alreadyImportedModules = {};
26
- for(var i = 0; i < this.length; i++) {
27
- var id = this[i][0];
28
- if(typeof id === "number")
29
- alreadyImportedModules[id] = true;
30
- }
31
- for(i = 0; i < modules.length; i++) {
32
- var item = modules[i];
33
- // skip already imported module
34
- // this implementation is not 100% perfect for weird media query combinations
35
- // when a module is imported multiple times with different media queries.
36
- // I hope this will never occur (Hey this way we have smaller bundles)
37
- if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
38
- if(mediaQuery && !item[2]) {
39
- item[2] = mediaQuery;
40
- } else if(mediaQuery) {
41
- item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
42
- }
43
- list.push(item);
44
- }
45
- }
46
- };
47
- return list;
48
- };
49
-
50
- function cssWithMappingToString(item, useSourceMap) {
51
- var content = item[1] || '';
52
- var cssMapping = item[3];
53
- if (!cssMapping) {
54
- return content;
55
- }
56
-
57
- if (useSourceMap && typeof btoa === 'function') {
58
- var sourceMapping = toComment(cssMapping);
59
- var sourceURLs = cssMapping.sources.map(function (source) {
60
- return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'
61
- });
62
-
63
- return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
64
- }
65
-
66
- return [content].join('\n');
67
- }
68
-
69
- // Adapted from convert-source-map (MIT)
70
- function toComment(sourceMap) {
71
- // eslint-disable-next-line no-undef
72
- var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
73
- var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
74
-
75
- return '/*# ' + data + ' */';
76
- }
@@ -1,14 +0,0 @@
1
- /*
2
- MIT License http://www.opensource.org/licenses/mit-license.php
3
- Author Tobias Koppers @sokra
4
- */
5
- module.exports = function getImportPrefix(loaderContext, query) {
6
- if(query.importLoaders === false)
7
- return "";
8
- var importLoaders = parseInt(query.importLoaders, 10) || 0;
9
- var loadersRequest = loaderContext.loaders.slice(
10
- loaderContext.loaderIndex,
11
- loaderContext.loaderIndex + 1 + importLoaders
12
- ).map(function(x) { return x.request; }).join("!");
13
- return "-!" + loadersRequest + "!";
14
- };
@@ -1,23 +0,0 @@
1
- /*
2
- MIT License http://www.opensource.org/licenses/mit-license.php
3
- Author Tobias Koppers @sokra
4
- */
5
- var loaderUtils = require("loader-utils");
6
- var path = require("path");
7
-
8
- module.exports = function getLocalIdent(loaderContext, localIdentName, localName, options) {
9
- if(!options.context) {
10
- if (loaderContext.rootContext) {
11
- options.context = loaderContext.rootContext;
12
- } else if (loaderContext.options && typeof loaderContext.options.context === "string") {
13
- options.context = loaderContext.options.context;
14
- } else {
15
- options.context = loaderContext.context;
16
- }
17
- }
18
- var request = path.relative(options.context, loaderContext.resourcePath);
19
- options.content = options.hashPrefix + request + "+" + localName;
20
- localIdentName = localIdentName.replace(/\[local\]/gi, localName);
21
- var hash = loaderUtils.interpolateName(loaderContext, localIdentName, options);
22
- return hash.replace(new RegExp("[^a-zA-Z0-9\\-_\u00A0-\uFFFF]", "g"), "-").replace(/^((-?[0-9])|--)/, "_$1");
23
- };