webpack and plugin import
See original GitHub issueHello all,
really good job, very simple and efficient lib !
Using webpack I can install wave surfer easily, but I fail to load plugins.
import WaveSurfer from "wavesurfer";
import Regions from "wavesurfer/plugin/wavesurfer.regions"
it builds, but in the console i get
Uncaught ReferenceError: WaveSurfer is not defined
at Object.<anonymous> (wavesurfer.regions.js:4)
at __webpack_require__ (bootstrap a294b25…:19)
at Object.__WEBPACK_AMD_DEFINE_ARRAY__ (wavesurfer.js:2)
at __webpack_require__ (bootstrap a294b25…:19)
at Object.<anonymous> (vue.js:5)
at __webpack_require__ (bootstrap a294b25…:19)
at Object.<anonymous> (index.js:1)
at __webpack_require__ (bootstrap a294b25…:19)
at Object.<anonymous> (main.js:4)
at __webpack_require__ (bootstrap a294b25…:19)
(anonymous) @ wavesurfer.regions.js:4
__webpack_require__ @ bootstrap a294b25…:19
__WEBPACK_AMD_DEFINE_ARRAY__ @ wavesurfer.js:2
__webpack_require__ @ bootstrap a294b25…:19
(anonymous) @ vue.js:5
__webpack_require__ @ bootstrap a294b25…:19
(anonymous) @ index.js:1
__webpack_require__ @ bootstrap a294b25…:19
(anonymous) @ main.js:4
__webpack_require__ @ bootstrap a294b25…:19
(anonymous) @ bootstrap a294b25…:39
(anonymous) @ bootstrap a294b25…:39
Not really a bug I think but seems a plugin require failure…
any clue??
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
webpack-plugin-import - npm
Start using webpack-plugin-import in your project by running `npm i webpack-plugin-import`. There are 24 other projects in the npm registry ...
Read more >Plugins - webpack
A webpack plugin is a JavaScript object that has an apply method. This apply method is called by the webpack compiler, giving access...
Read more >imports-loader - webpack
The imports loader allows you to use modules that depend on specific global ... Be careful, existing imports ( import / require )...
Read more >InstallWebpackPlugin | webpack
Instead, use require or import how you normally would and installation will happen automatically to install & save missing dependencies while you work!...
Read more >Plugins - webpack
Plugins ; ProvidePlugin, Use modules without having to use import/require ; SourceMapDevToolPlugin, Enables a more fine grained control of source maps.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
it works for what I tried 😃
https://postimg.org/image/k2qq3szpb/
PS : what is elan and cursor ??
PPS : oh, and it seems that there is some changes in plugins behavior, like for Region and “enableDragSelection”
what is the alternative solution to use plugins with webpack before v2?