Cannot import sinon-chrome with webpack
See original GitHub issueWhen I try to require the new version 1.0.0
with webpack I get the following error.
TypeError: 'undefined' is not an object (evaluating 'modules[moduleId].call')
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Webpack: cannot reach my imported module - Stack Overflow
I import a .js module in my entry file. It is included in the bundle.js. It is still undefined and cannot figure out...
Read more >TypeScript - webpack
To make imports do this by default and keep import _ from 'lodash'; syntax in TypeScript, set "allowSyntheticDefaultImports" : true and "esModuleInterop" ...
Read more >Module Methods - webpack
A normal import statement cannot be used dynamically within other logic or contain variables. See the spec for more information and import() below...
Read more >less-loader | webpack - JS.ORG
less-loader applies a Less plugin that passes all queries to the webpack resolver if less could not resolve @import . Thus you can...
Read more >Resolve | webpack
For example, when calling import 'lodash' in ES2015, the resolve options can change where webpack goes to look for 'lodash' (see modules )....
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
Hi, @sk- .
It’s legendary problem =). Check out this issue in webpack repo https://github.com/webpack/webpack/issues/304
This problem is related with incorrect sinon exports module interface, you should load sinon “manually” to solve it.
@acvetkov Your config almost worked for me - I had to make 2 modifications:
sinon that is inside
node_modules/sinon/libinstead of
node_modules/sinon/pkg`$
to thenoParse
rule. Otherwise it would also eagerly cover thesinon-chrome
package itself!