svg-sprite-loader
Advanced tools
Comparing version 0.0.27 to 0.0.28
@@ -19,3 +19,4 @@ var path = require('path'); | ||
spriteModule: path.resolve(__dirname, 'lib/web/global-sprite'), | ||
extract: false | ||
extract: false, | ||
esModule: false | ||
}; |
@@ -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 @@ } |
@@ -0,0 +0,0 @@ var ExtractPlugin = require('extract-text-webpack-plugin'); |
@@ -0,0 +0,0 @@ module.exports = { |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ var path = require('path'); |
@@ -0,0 +0,0 @@ var cheerio = require('cheerio'); |
@@ -0,0 +0,0 @@ var path = require('path'); |
@@ -0,0 +0,0 @@ if ('angular' in window) { |
@@ -0,0 +0,0 @@ var Sprite = require('./sprite'); |
@@ -0,0 +0,0 @@ var Sniffr = require('sniffr'); |
{ | ||
"name": "svg-sprite-loader", | ||
"version": "0.0.27", | ||
"version": "0.0.28", | ||
"description": "SVG sprite webpack loader", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -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 |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
545
138
23908