svg-sprite-loader
Advanced tools
+2
-1
@@ -19,3 +19,4 @@ var path = require('path'); | ||
| spriteModule: path.resolve(__dirname, 'lib/web/global-sprite'), | ||
| extract: false | ||
| extract: false, | ||
| esModule: false | ||
| }; |
+6
-2
@@ -56,4 +56,8 @@ var path = require('path'); | ||
| var exportCode = config.esModule | ||
| ? 'module.exports.__esModule = true;\n module.exports["default"] = ' | ||
| : 'module.exports = '; | ||
| if (config.extract) { | ||
| output = ['module.exports = ' + JSON.stringify(content) + ';']; | ||
| output = [exportCode + JSON.stringify(content) + ';']; | ||
| } else { | ||
@@ -64,3 +68,3 @@ output = [ | ||
| 'var image = ' + JSON.stringify(content) + ';', | ||
| 'module.exports = sprite.add(image, "' + id + '");' | ||
| exportCode + 'sprite.add(image, "' + id + '");' | ||
| ]; | ||
@@ -67,0 +71,0 @@ } |
+1
-1
| { | ||
| "name": "svg-sprite-loader", | ||
| "version": "0.0.27", | ||
| "version": "0.0.28", | ||
| "description": "SVG sprite webpack loader", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
+1
-0
@@ -57,2 +57,3 @@ # Webpack SVG sprite loader | ||
| * `spriteModule` defines [custom sprite implementation](#custom-sprite-implementation) module path. | ||
| * `esModule` whether to transpile module to ES compatible format. When this option is set to `true`, loader will produce `module.exports.__esModule = true; module.exports['default'] = svg`. Default is `false`. Useful for transpilers other than Babel. | ||
@@ -59,0 +60,0 @@ ## Examples |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
545
0.74%138
0.73%23908
-1.59%