Closed gregorskii closed 7 years ago
Wallaby-webpack fully supports webpack 2 (we have been supporting it since early beta bits of webpack 2).
I think this also tries to load from the projects webpack config
Wallaby-webpack doesn't automatically load webpack config. You have to pass the config to it (and if it is a valid webpack 2 config, it should work).
Please share a sample with the issue, happy to have a look.
Ok, I will double check everything. Thanks for the clarification.
I did pass the config to it in the wallaby config.
A corporate project I work on also experienced this. After lots of work I discovered that the issue was because the node_modules folder wasn't at the same level as the wallaby.js file. For the time being I have solved the issue by having a duplicate copy of our node_modules folder next to the wallaby.js file. This isn't ideal but it allows us to test.
@developermj It should be possible to configure wallaby to work for your case. A couple of things may be required:
NODE_PATH
in the wallaby config so that it knows where to look for webpack module,resolve.modules
setting so that webpack knows where find the modules.I'm not sure if I should continue to post here. I tried the suggested solution and they are not working for me.
Here is the setup from wallaby-webpack: var path = require("path");
var modulesPath = path.resolve("../../node_modules");
var wallabyWebpack = require('wallaby-webpack'); var webpackPostprocessor = wallabyWebpack({ resolve: { modules: [modulesPath] }, resolveLoader: { modules: [modulesPath] } });
Posting my debug log from running wallaby:
wallaby.js started
core v1.0.391
Mon, 22 May 2017 14:50:58 GMT wallaby:project Wallaby config: Dev\Source\
Dev\Source\\node_modules\webpack\lib\webpack.js:19:9)
at WebpackPostprocessor._createCompiler (Dev\Source\\node_modules\wallaby-webpack\index.js:270:41)
at Dev\Source\\node_modules\wallaby-webpack\index.js:112:31
at C:\Users\.wallaby\core\server.js:16:17265
From previous event:
at Object.postprocessor (C:\Users\.wallaby\core\server.js:16:16323)
at C:\Users\.wallaby\core\server.js:16:31587
at [object Object]._onTimeout (C:\Users\.wallaby\core\server.js:16:31138)
at Timer.listOnTimeout (timers.js:92:15)
Mon, 22 May 2017 14:51:02 GMT wallaby:project Test run finished
Mon, 22 May 2017 14:51:02 GMT wallaby:project Test run data re-queued
@developermj Could you please create a sample repo with your setup (and folder structure) so we could have a look?
This library does not support webpack 2.
Are there plans to update it?
I think this also tries to load from the projects webpack config. If the project is using webpack 2 it crashes:
Thanks :)