mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
* [webpack] upgrade to @elastic/webpack-directory-name-as-main v2 * bump @elastic/webpack-directory-name-as-main * import browser mocha with webpackShim `import 'mocha'` will resolve to `mocha/index.js`, which points to `mocha/lib/mocha.js`, the node version of mocha. This will not work in the browser. Since ng_mock is browser code, we need the mocha build for the browser, which lives at `mocha/mocha.js`. This isn't referenced at all in the package.json file, but is references in the bower.json file. Webpack, however, doesn't observe the bower config, so we need to specifically reach into the mocha package and point to the `mocha/mocha.js` file.
1 line
60 B
JavaScript
1 line
60 B
JavaScript
module.exports = require('../node_modules/mocha/mocha.js');
|