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

bower.json question #767

Closed
pitrackster opened this issue Jul 6, 2016 · 4 comments
Closed

bower.json question #767

pitrackster opened this issue Jul 6, 2016 · 4 comments
Labels

Comments

@pitrackster
Copy link

Hi !
I'm currently trying to use wavesurfer with webpack / ES6 / angular...
I have a problem with the folder name created via the bower command (ie wavesurfer.js) because webpack search for a file named wavesurfer.js but find a folder so it get stuck...

If I change the name of the folder (removing the .js) it works ...

So I am wondering if it is possible to change the package name so that it will not create a folder with .js ?

@thijstriemstra
Copy link
Contributor

You should be able to work aroind this issur in webpack, there's no chance the folder name is going to get changed anytime soon, just to accomodate webpack functionality

@pitrackster
Copy link
Author

Ok thanks anyway

@xbill82
Copy link

xbill82 commented Dec 17, 2016

@pitrackster you can add an alias in your webpack config file

module.exports = {
  resolve: {
    alias: {
      'wavesurfer': path.resolve(__dirname, './node_modules/wavesurfer.js/dist/wavesurfer.js')
    }
  }
}

then you'll be able to

import wavesurfer from 'wavesurfer'

Note for the maintainers: this comment may constitute a minimal How-to with Webpack in the main README.md.

@katspaugh
Copy link
Owner

katspaugh commented Dec 17, 2016

Thanks, @xbill82! Adding to the readme.

Update: added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants