Skip to content

Commit

Permalink
fix(configure): use browser-spritebrowser-symbol for `electron-re…
Browse files Browse the repository at this point in the history
…nderer` target
  • Loading branch information
meowtec authored and kisenka committed May 13, 2017
1 parent 8220d6d commit b9a3ed0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/configurator.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ const extractTextPluginCompilerName = 'extract-text-webpack-plugin';
const isomorphicSpriteModule = 'svg-sprite-loader/runtime/sprite.build';
const isomorphicSymbolModule = 'svg-baker-runtime/symbol';

const isTargetBrowser = target => target === 'web' || target === 'electron-renderer';

/**
* @param {Object} params
* @param {Object} [params.config] Parsed loader config {@see SVGSpriteLoaderConfig}
Expand All @@ -19,8 +21,8 @@ module.exports = function configurator({ config, context }) {
const compiler = context._compiler;

const autoConfigured = {
spriteModule: target === 'web' ? defaults.spriteModule : isomorphicSpriteModule,
symbolModule: target === 'web' ? defaults.symbolModule : isomorphicSymbolModule,
spriteModule: isTargetBrowser(target) ? defaults.spriteModule : isomorphicSpriteModule,
symbolModule: isTargetBrowser(target) ? defaults.symbolModule : isomorphicSymbolModule,
extract: utils.isModuleShouldBeExtracted(module),
esModule: context.version && context.version >= 2
};
Expand Down

0 comments on commit b9a3ed0

Please sign in to comment.