Not able to use the library as a browser module because of "path" dependency
See original GitHub issueI am trying to import this library as a module in the browser. There is a require("path")
dependency that is preventing it from being used as a browser module.
Any solutions to this problem.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Ways to deal with es6 module paths and dependencies
In particular I have 1 library i'd like to split into 3 modules. Let's call the library "salad" and uses "utensils" and "ingredients"....
Read more >Common TypeScript module problems and how to solve them
Problem 1: Irregular location of dependencies ; node_modules in the ; src directory even though ; node_modules is located outside the ; src ......
Read more >JavaScript modules - MDN Web Docs
Use of native JavaScript modules is dependent on the import and export statements; these are supported in browsers as shown in the compatibility ......
Read more >A Guide to Managing Webpack Dependencies - Toptal
The Webpack module bundler processes JavaScript code and all static assets ... Relative paths are not directly related to dependencies, but we use...
Read more >rollup.js
It is bad practice to mix default and named exports in the same module, though it is allowed by the specification. How bindings...
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 Free
Top 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
Last time I checked it worked just fine as an npm module via
require("wabt")
, but bundling it may require shimming node’spath
module apparently. I know that webpack can do this with config options, either stubbing the module out (not sure if that’ll work, depends on what wabt does with it I guess) or providing an alternative implementation that works in the browser.v1.0.16 works for me, v1.0.17, not.