Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wish to support when webpack's target is 'node-webkit' for nw.js #419

Closed
xinhailishi opened this issue Dec 9, 2020 · 2 comments
Closed

Comments

@xinhailishi
Copy link
Contributor

xinhailishi commented Dec 9, 2020

Do you want to request a feature, report a bug or ask a question?
report a bug .
What is the current behavior?
when use nw,it not works. it does not inject svg to html auto.
What is the expected behavior?
wish to support when webpack's target is 'node-webkit' for nw.js and inject svg to html.
If the current behavior is a bug, please provide the steps to reproduce, at least part of webpack config with loader configuration and piece of your code.
The best way is to create repo with minimal setup to demonstrate a problem (package.json, webpack config and your code).
It you don't want to create a repository - create a gist with multiple files

If this is a feature request, what is motivation or use case for changing the behavior?
svg-sprite-loader-master\lib\configurator.js,
const isTargetBrowser = target => target === 'web' || target === 'electron-renderer';
Please tell us about your environment:

  • Node.js version: ?
    node 12
  • webpack version: ?
    4.41.1
  • svg-sprite-loader version: ?
    4.3
  • OS type & version: ?
    win 10
    Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
@xinhailishi
Copy link
Contributor Author

xinhailishi commented Dec 9, 2020

i think it should update const isTargetBrowser = target => target === 'web' || target === 'electron-renderer' to
const isTargetBrowser = target => target === 'web' || target === 'electron-renderer' || target === 'node-webkit' || target === 'nwjs';
like this pr ,support node-webkit

@d3x42
Copy link
Contributor

d3x42 commented Dec 14, 2020

PR merged

@d3x42 d3x42 closed this as completed Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants