{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/webpack/issues/784","labels_url":"https://api.github.com/repos/webpack/webpack/issues/784/labels{/name}","comments_url":"https://api.github.com/repos/webpack/webpack/issues/784/comments","events_url":"https://api.github.com/repos/webpack/webpack/issues/784/events","html_url":"https://github.com/webpack/webpack/issues/784","id":57328116,"number":784,"title":"Sym or npm link with module loader confuse file lookup","user":{"login":"totty90","id":236974,"avatar_url":"https://avatars.githubusercontent.com/u/236974?v=3","gravatar_id":"","url":"https://api.github.com/users/totty90","html_url":"https://github.com/totty90","followers_url":"https://api.github.com/users/totty90/followers","following_url":"https://api.github.com/users/totty90/following{/other_user}","gists_url":"https://api.github.com/users/totty90/gists{/gist_id}","starred_url":"https://api.github.com/users/totty90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/totty90/subscriptions","organizations_url":"https://api.github.com/users/totty90/orgs","repos_url":"https://api.github.com/users/totty90/repos","events_url":"https://api.github.com/users/totty90/events{/privacy}","received_events_url":"https://api.github.com/users/totty90/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/webpack/webpack/labels/webpack-2","name":"webpack-2","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-02-11T15:12:23Z","updated_at":"2015-04-22T19:44:55Z","closed_at":null,"body":"With a sym or npm link node module the output is this (totty-project is the node module):\r\n\r\n    ERROR in ../totty-project/src/core/fixes/validate.js-shim.js\r\n    Module not found: Error: Cannot resolve module 'script' in C:\\web\\totty-project\\src\\core\\fixes\r\n     @ ../totty-project/src/core/fixes/validate.js-shim.js 1:17-46\r\n\r\nThis means that he can't find the file `\"Cannot find module \\\"validate.jsUnFixed\\` from file `totty-project/src/core/fixes/validate.js-shim.js`. \r\n\r\nFile `totty-project/src/core/fixes/validate.js-shim.js`:\r\n\r\n    module.exports = require('validate.jsUnFixed');\r\n\r\nWebpack config aliases:\r\n\r\n                'validate.jsUnFixed' : absPath(\"node_modules/validate.js/validate.min\"),\r\n                'validate.js'        : absPath(\"node_modules/totty-project/src/core/fixes/validate.js-shim.js\"),\r\n\r\nWebpack config module loaders:\r\n\r\n                {\r\n                    test   : /validate\\.min\\.js/,\r\n                    loader : 'script'\r\n                },\r\n\r\nI don't know why with a sym link he looks into the original path of the sym link c:\\web\\totty-project instead of the c:\\web\\main-project\\node_modules\\totty-project.\r\n\r\nIs very interesting to note that if I remove the module loader it works as expected. I think the module loader might influence this behaviour.\r\n\r\n\r\nI've also noticed that puts my `totty-project` in a different path in the source list in chrome. With sym link it shows below `../totty-project` while as normal folder shows below `./~/totty-project`. This only happens with this module. I have other sym linked modules and work fine. It should not even include into the web bundle those files, because are just webpack/build config/tools.\r\n\r\n# It might be because of this too: \r\n\r\n`webpack.config.js`:\r\n\r\n    module.exports = require('totty-project').webpackConfig({\r\n        rootPath: __dirname\r\n    });\r\n\r\n\r\nWith a normal folder copy this works ok."},"comment":{"url":"https://api.github.com/repos/webpack/webpack/issues/comments/95314398","html_url":"https://github.com/webpack/webpack/issues/784#issuecomment-95314398","issue_url":"https://api.github.com/repos/webpack/webpack/issues/784","id":95314398,"user":{"login":"speigg","id":507127,"avatar_url":"https://avatars.githubusercontent.com/u/507127?v=3","gravatar_id":"","url":"https://api.github.com/users/speigg","html_url":"https://github.com/speigg","followers_url":"https://api.github.com/users/speigg/followers","following_url":"https://api.github.com/users/speigg/following{/other_user}","gists_url":"https://api.github.com/users/speigg/gists{/gist_id}","starred_url":"https://api.github.com/users/speigg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/speigg/subscriptions","organizations_url":"https://api.github.com/users/speigg/orgs","repos_url":"https://api.github.com/users/speigg/repos","events_url":"https://api.github.com/users/speigg/events{/privacy}","received_events_url":"https://api.github.com/users/speigg/received_events","type":"User","site_admin":false},"created_at":"2015-04-22T19:44:55Z","updated_at":"2015-04-22T19:44:55Z","body":"I switched from an `exclude` to `include` rule for the `babel-loader` and it seems to be working now. "}}