enhanced-require icon indicating copy to clipboard operation
enhanced-require copied to clipboard

[CURRENTLY UNMAINTAINED] Enhance the require function in node.js with support for loaders which preprocess files. This is a standalone polyfill for features of webpack.

Results 10 enhanced-require issues
Sort by recently updated
recently updated
newest added

For example ``` define(function(require, exports, module){ var logic = { a: 3 } return logic; }); ``` will now work. But this will continue to work too ``` define(function(require, exports,...

I have a large app built on webpack and the server side uses that files. How I'm supposed to make them work (in the future) if this project is "CURRENTLY...

The following code is given as part of the explanation on how to use the enhanced require: ``` // startup your application myRequire("./startup"); ``` Except there is no mention what...

I'm doing unit testing in node with mocha. Everything works smoothly but when I hit the code that uses `require.context()` I get an exception: ``` console TypeError: Object function require(path)...

I'm using the [webdriver-sync]() webdriver module which uses the `java` module. With the default node.js require everything works as expected. With the enhanced require the result is this: ``` C:\app\node_modules\webdriver-sync\node_modules\java\build\Release\nodejavabridge_bindings.node:1...

- [ ] extract loaders logic into separate module - [ ] add a plugin system, like webpacks - [ ] use up-to-date version of enhanced-resolve - [ ] update...

Triyng to use [mocha-loader](https://github.com/webpack/mocha-loader). Seemed that `module.paths` is undefined. ``` shell root@9b1e81b9d724:/srv# enhanced-require 'mocha-loader\!./a.js' /srv/node_modules/mocha/lib/mocha.js:28 module.paths.push(cwd, join(cwd, 'node_modules')); ^ TypeError: Cannot read property 'push' of undefined at /srv/node_modules/mocha/lib/mocha.js:28:15 at NormalModuleMixin.Module._compile...

> Error: Cannot resolve file or directory C:\app\node_modules\fibers\bin\win32-ia32-v8-3.14\fibers in C:\app\node_modules\fibers Starts in index.js ``` GLOBAL.__webpack_public_path__ = ''; var options = require('../../webpack.config'); options.recursive = true; var myRequire = require('enhanced-require')(module, options); var...

Trying to use file-loader with this in node.js gives me the error `emitFile is required from module system`.

A module like this will return {} ``` define(function(require, exports, module){ var logic = { a: 3 } return logic; }); ``` Here is the index.js ``` var myRequire2 =...