{"action":"created","issue":{"url":"https://api.github.com/repos/shakacode/bootstrap-loader/issues/47","repository_url":"https://api.github.com/repos/shakacode/bootstrap-loader","labels_url":"https://api.github.com/repos/shakacode/bootstrap-loader/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/shakacode/bootstrap-loader/issues/47/comments","events_url":"https://api.github.com/repos/shakacode/bootstrap-loader/issues/47/events","html_url":"https://github.com/shakacode/bootstrap-loader/issues/47","id":134631069,"number":47,"title":"Uncaught ReferenceError: jQuery is not defined","user":{"login":"matiishyn","id":3661065,"avatar_url":"https://avatars.githubusercontent.com/u/3661065?v=3","gravatar_id":"","url":"https://api.github.com/users/matiishyn","html_url":"https://github.com/matiishyn","followers_url":"https://api.github.com/users/matiishyn/followers","following_url":"https://api.github.com/users/matiishyn/following{/other_user}","gists_url":"https://api.github.com/users/matiishyn/gists{/gist_id}","starred_url":"https://api.github.com/users/matiishyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matiishyn/subscriptions","organizations_url":"https://api.github.com/users/matiishyn/orgs","repos_url":"https://api.github.com/users/matiishyn/repos","events_url":"https://api.github.com/users/matiishyn/events{/privacy}","received_events_url":"https://api.github.com/users/matiishyn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-18T16:38:35Z","updated_at":"2016-02-18T18:26:31Z","closed_at":null,"body":"I have an error: `Uncaught ReferenceError: jQuery is not defined`\r\nI have [`imports-loader`](https://github.com/webpack/imports-loader) installed but I still have this error.\r\n\r\nCould you please help me to resolve it?\r\nthis is my `webpack.config.js`\r\n\r\n```js\r\nvar path = require('path');\r\nvar webpack = require('webpack');\r\n\r\nmodule.exports = {\r\n    devtool: 'source-map',\r\n    entry: [\r\n        'webpack-hot-middleware/client',\r\n        'bootstrap-loader',\r\n        './app/index'\r\n    ],\r\n    output: {\r\n        path: path.join(__dirname, 'dist'),\r\n        filename: 'bundle.js',\r\n        publicPath: '/static/'\r\n    },\r\n    plugins: [\r\n        new webpack.optimize.OccurenceOrderPlugin(),\r\n        new webpack.HotModuleReplacementPlugin(),\r\n        new webpack.NoErrorsPlugin()\r\n    ],\r\n    module: {\r\n        loaders: [\r\n            // es6, JSX\r\n            {\r\n                test: /\\.js$/,\r\n                loader: 'babel',\r\n                exclude: /node_modules/,\r\n                include: __dirname,\r\n                query: {\r\n                    cacheDirectory: true,\r\n                    presets: ['es2015', 'react', 'stage-0']\r\n                }\r\n            },\r\n            // SASS as CSS modules\r\n            {\r\n                test: /\\.scss$/,\r\n                loaders: [\r\n                    \"style\",\r\n                    \"css?modules&importLoaders=1&localIdentName=[path]___[name]__[local]___[hash:base64:5]\",\r\n                    \"sass\"\r\n                ]\r\n            },\r\n            // fonts\r\n            {\r\n                test: /\\.(woff2?|ttf|eot|svg)$/,\r\n                loader: 'url?limit=10000'\r\n            },\r\n\r\n            // Bootstrap 3\r\n            {test: /bootstrap-sass\\/assets\\/javascripts\\//, loader: 'imports?jQuery=jquery'}\r\n        ]\r\n    }\r\n}\r\n```\r\n\r\nlooks like yours in your examples..."},"comment":{"url":"https://api.github.com/repos/shakacode/bootstrap-loader/issues/comments/185848056","html_url":"https://github.com/shakacode/bootstrap-loader/issues/47#issuecomment-185848056","issue_url":"https://api.github.com/repos/shakacode/bootstrap-loader/issues/47","id":185848056,"user":{"login":"matiishyn","id":3661065,"avatar_url":"https://avatars.githubusercontent.com/u/3661065?v=3","gravatar_id":"","url":"https://api.github.com/users/matiishyn","html_url":"https://github.com/matiishyn","followers_url":"https://api.github.com/users/matiishyn/followers","following_url":"https://api.github.com/users/matiishyn/following{/other_user}","gists_url":"https://api.github.com/users/matiishyn/gists{/gist_id}","starred_url":"https://api.github.com/users/matiishyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matiishyn/subscriptions","organizations_url":"https://api.github.com/users/matiishyn/orgs","repos_url":"https://api.github.com/users/matiishyn/repos","events_url":"https://api.github.com/users/matiishyn/events{/privacy}","received_events_url":"https://api.github.com/users/matiishyn/received_events","type":"User","site_admin":false},"created_at":"2016-02-18T18:26:31Z","updated_at":"2016-02-18T18:26:31Z","body":"I was experimenting a little bit. `imports-loader` plugin works well. And I'm guessing that you may reproduce this bug on Windows only, since there's another path separator.\r\nSo, maybe inside webpack's loader's test expression we should use `path.sep` instead of hardcoded unix's `\\`.\r\n\r\nHere how test works on my Windows machine:\r\n![image](https://cloud.githubusercontent.com/assets/3661065/13153563/1a03c274-d675-11e5-8147-b5f08c4fbac8.png)\r\n\r\nObviously string like `C:\\PROJECTS\\TEST\\bootstrap-loader\\examples\\basic\\node_modules\\bootstrap-sass\\assets\\javascripts\\bootstrap\\tab.js` cannot be caught with such regexp `bootstrap-sass\\/assets\\/javascripts\\/`\r\n\r\nAm I right? Am I on the right way?"}}