{"action":"created","issue":{"url":"https://api.github.com/repos/js-next/react-style-webpack-plugin/issues/12","repository_url":"https://api.github.com/repos/js-next/react-style-webpack-plugin","labels_url":"https://api.github.com/repos/js-next/react-style-webpack-plugin/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/js-next/react-style-webpack-plugin/issues/12/comments","events_url":"https://api.github.com/repos/js-next/react-style-webpack-plugin/issues/12/events","html_url":"https://github.com/js-next/react-style-webpack-plugin/issues/12","id":66505464,"number":12,"title":"error when including react-style-webpack-plugin in webpack.config.js","user":{"login":"jorda0mega","id":484084,"avatar_url":"https://avatars.githubusercontent.com/u/484084?v=3","gravatar_id":"","url":"https://api.github.com/users/jorda0mega","html_url":"https://github.com/jorda0mega","followers_url":"https://api.github.com/users/jorda0mega/followers","following_url":"https://api.github.com/users/jorda0mega/following{/other_user}","gists_url":"https://api.github.com/users/jorda0mega/gists{/gist_id}","starred_url":"https://api.github.com/users/jorda0mega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorda0mega/subscriptions","organizations_url":"https://api.github.com/users/jorda0mega/orgs","repos_url":"https://api.github.com/users/jorda0mega/repos","events_url":"https://api.github.com/users/jorda0mega/events{/privacy}","received_events_url":"https://api.github.com/users/jorda0mega/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2015-04-06T01:51:13Z","updated_at":"2016-10-12T06:20:14Z","closed_at":"2015-04-15T14:53:36Z","body":"the moment I include this plugin as part of my webpack.config.js I get an error. Seems like it cannot some DOM elements?\r\n\r\nHere is the webpack.config.js\r\n``` javascript\r\nvar webpack = require('webpack');\r\nvar path = require('path');\r\nvar ReactStylePlugin = require('react-style-webpack-plugin');\r\nvar ExtractTextPlugin = require('extract-text-webpack-plugin');\r\n\r\nmodule.exports = {\r\n  devtool: \"source-map\",\r\n  entry: [\r\n    'webpack-dev-server/client?http://localhost:3000',\r\n    'webpack/hot/only-dev-server',\r\n    'bootstrap-webpack!bootstrap.config.js',\r\n    './scripts/index'\r\n  ],\r\n  output: {\r\n    path: __dirname + '/build/',\r\n    filename: 'bundle.js',\r\n    publicPath: '/build/'\r\n  },\r\n  plugins: [\r\n    new webpack.HotModuleReplacementPlugin(),\r\n    new webpack.NoErrorsPlugin(),\r\n    new webpack.ProvidePlugin({\r\n      $: 'jquery',\r\n      jQuery: 'jquery',\r\n      \"windows.jQuery\": 'jquery'\r\n    }),\r\n    new ReactStylePlugin('bundle.css')\r\n  ],\r\n  resolve: {\r\n    root: [path.resolve(__dirname), path.resolve(__dirname, \"./styles\")],\r\n    extensions: ['', '.js', '.jsx']\r\n  },\r\n  module: {\r\n    loaders: [\r\n      { test: /\\.css$/, loaders: ['style', 'css']},\r\n      { test: /\\.less?$/, loader: 'style!css!less'},\r\n      { test: /\\.jsx?$/, loaders: ['react-hot',ReactStylePlugin.loader(),'babel'], exclude: [/node_modules/, /\\.config.jsx?$/] },\r\n      { test: /\\.woff$/,   loader: \"url-loader?limit=10000&minetype=application/font-woff\" },\r\n      { test: /\\.woff2$/,   loader: \"url-loader?limit=10000&minetype=application/font-woff\" },\r\n      { test: /\\.ttf$/,    loader: \"file-loader\" },\r\n      { test: /\\.eot$/,    loader: \"file-loader\" },\r\n      { test: /\\.svg$/,    loader: \"file-loader\" }\r\n    ]\r\n  }\r\n};\r\n```\r\n\r\nError:\r\n```\r\nERROR in ./~/react-style-webpack-plugin/lib/emptyLoader.js!./~/extract-text-webpack-plugin/loader.js?{\"remove\":true}!./~/react-style-webpack-plugin/lib/entry.js!./~/bootstrap-webpack/index.loader.js!./bootstrap.config.js\r\nModule build failed: ReferenceError: document is not defined\r\n    at addStyle (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/bootstrap-webpack/index.loader.js!/Users/jorgef/dev/cervojo/bootstrap.config.js:5956:22)\r\n    at Object.<anonymous> (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/bootstrap-webpack/index.loader.js!/Users/jorgef/dev/cervojo/bootstrap.config.js:5937:3)\r\n    at __webpack_require__ (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/bootstrap-webpack/index.loader.js!/Users/jorgef/dev/cervojo/bootstrap.config.js:468:30)\r\n    at fn (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/bootstrap-webpack/index.loader.js!/Users/jorgef/dev/cervojo/bootstrap.config.js:40:20)\r\n    at Object.<anonymous> (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/bootstrap-webpack/index.loader.js!/Users/jorgef/dev/cervojo/bootstrap.config.js:501:2)\r\n    at __webpack_require__ (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/bootstrap-webpack/index.loader.js!/Users/jorgef/dev/cervojo/bootstrap.config.js:468:30)\r\n    at /Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/bootstrap-webpack/index.loader.js!/Users/jorgef/dev/cervojo/bootstrap.config.js:493:37\r\n    at Object.<anonymous> (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/bootstrap-webpack/index.loader.js!/Users/jorgef/dev/cervojo/bootstrap.config.js:496:10)\r\n    at Module._compile (module.js:460:26)\r\n    at Object.loaderContext.exec (/Users/jorgef/dev/cervojo/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:86:7)\r\n\r\nERROR in ./~/react-style-webpack-plugin/lib/emptyLoader.js!./~/extract-text-webpack-plugin/loader.js?{\"remove\":true}!./~/react-style-webpack-plugin/lib/entry.js!./scripts/index.jsx\r\nModule build failed: Error: Invariant Violation: You cannot use <HistoryLocation> without a DOM\r\n    at invariant (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/react-hot-loader/index.js!/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/annotate.js!/Users/jorgef/dev/cervojo/node_modules/babel-loader/index.js!/Users/jorgef/dev/cervojo/scripts/index.jsx:2617:16)\r\n    at createRouter (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/react-hot-loader/index.js!/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/annotate.js!/Users/jorgef/dev/cervojo/node_modules/babel-loader/index.js!/Users/jorgef/dev/cervojo/scripts/index.jsx:32660:6)\r\n    at Object.runRouter [as run] (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/react-hot-loader/index.js!/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/annotate.js!/Users/jorgef/dev/cervojo/node_modules/babel-loader/index.js!/Users/jorgef/dev/cervojo/scripts/index.jsx:33424:17)\r\n    at /Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/react-hot-loader/index.js!/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/annotate.js!/Users/jorgef/dev/cervojo/node_modules/babel-loader/index.js!/Users/jorgef/dev/cervojo/scripts/index.jsx:535:9\r\n    at Object.<anonymous> (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/react-hot-loader/index.js!/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/annotate.js!/Users/jorgef/dev/cervojo/node_modules/babel-loader/index.js!/Users/jorgef/dev/cervojo/scripts/index.jsx:539:27)\r\n    at Object.<anonymous> (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/react-hot-loader/index.js!/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/annotate.js!/Users/jorgef/dev/cervojo/node_modules/babel-loader/index.js!/Users/jorgef/dev/cervojo/scripts/index.jsx:543:31)\r\n    at __webpack_require__ (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/react-hot-loader/index.js!/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/annotate.js!/Users/jorgef/dev/cervojo/node_modules/babel-loader/index.js!/Users/jorgef/dev/cervojo/scripts/index.jsx:468:30)\r\n    at /Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/react-hot-loader/index.js!/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/annotate.js!/Users/jorgef/dev/cervojo/node_modules/babel-loader/index.js!/Users/jorgef/dev/cervojo/scripts/index.jsx:493:37\r\n    at Object.<anonymous> (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/react-hot-loader/index.js!/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/annotate.js!/Users/jorgef/dev/cervojo/node_modules/babel-loader/index.js!/Users/jorgef/dev/cervojo/scripts/index.jsx:496:10)\r\n    at Module._compile (module.js:460:26)\r\n\r\nERROR in ./~/react-style-webpack-plugin/lib/emptyLoader.js!./~/extract-text-webpack-plugin/loader.js?{\"remove\":true}!./~/react-style-webpack-plugin/lib/entry.js!(webpack)-dev-server/client?http://localhost:3000\r\nModule build failed: ReferenceError: navigator is not defined\r\n    at Object.<anonymous> (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/webpack-dev-server/client/index.js?http://localhost:3000:4780:18)\r\n    at Object.module.exports.module.exports.Object.keys.arr (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/webpack-dev-server/client/index.js?http://localhost:3000:5357:31)\r\n    at __webpack_require__ (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/webpack-dev-server/client/index.js?http://localhost:3000:468:30)\r\n    at fn (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/webpack-dev-server/client/index.js?http://localhost:3000:40:20)\r\n    at Object.<anonymous> (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/webpack-dev-server/client/index.js?http://localhost:3000:4601:15)\r\n    at __webpack_require__ (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/webpack-dev-server/client/index.js?http://localhost:3000:468:30)\r\n    at fn (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/webpack-dev-server/client/index.js?http://localhost:3000:40:20)\r\n    at Object.<anonymous> (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/webpack-dev-server/client/index.js?http://localhost:3000:4350:18)\r\n    at __webpack_require__ (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/webpack-dev-server/client/index.js?http://localhost:3000:468:30)\r\n    at fn (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/webpack-dev-server/client/index.js?http://localhost:3000:40:20)\r\n\r\nERROR in ./~/react-style-webpack-plugin/lib/emptyLoader.js!./~/extract-text-webpack-plugin/loader.js?{\"remove\":true}!./~/react-style-webpack-plugin/lib/entry.js!(webpack)/hot/only-dev-server.js\r\nModule build failed: ReferenceError: window is not defined\r\n    at Object.<anonymous> (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/webpack/hot/only-dev-server.js:553:26)\r\n    at __webpack_require__ (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/webpack/hot/only-dev-server.js:468:30)\r\n    at /Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/webpack/hot/only-dev-server.js:493:37\r\n    at Object.<anonymous> (/Users/jorgef/dev/cervojo/node_modules/react-style-webpack-plugin/lib/entry.js!/Users/jorgef/dev/cervojo/node_modules/webpack/hot/only-dev-server.js:496:10)\r\n    at Module._compile (module.js:460:26)\r\n    at Object.loaderContext.exec (/Users/jorgef/dev/cervojo/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:86:7)\r\n    at Object.<anonymous> (/Users/jorgef/dev/cervojo/node_modules/extract-text-webpack-plugin/loader.js:93:22)\r\n    at Tapable.<anonymous> (/Users/jorgef/dev/cervojo/node_modules/webpack/lib/Compiler.js:212:10)\r\n    at /Users/jorgef/dev/cervojo/node_modules/webpack/lib/Compiler.js:400:12\r\n    at Tapable.next (/Users/jorgef/dev/cervojo/node_modules/webpack/node_modules/tapable/lib/Tapable.js:69:11)\r\nChild extract-text-webpack-plugin:\r\n        + 135 hidden modules\r\nChild extract-text-webpack-plugin:\r\n        + 490 hidden modules\r\nChild extract-text-webpack-plugin:\r\n        + 99 hidden modules\r\nChild extract-text-webpack-plugin:\r\n        + 46 hidden modules\r\n```"},"comment":{"url":"https://api.github.com/repos/js-next/react-style-webpack-plugin/issues/comments/253129176","html_url":"https://github.com/js-next/react-style-webpack-plugin/issues/12#issuecomment-253129176","issue_url":"https://api.github.com/repos/js-next/react-style-webpack-plugin/issues/12","id":253129176,"user":{"login":"Norm-","id":4752656,"avatar_url":"https://avatars.githubusercontent.com/u/4752656?v=3","gravatar_id":"","url":"https://api.github.com/users/Norm-","html_url":"https://github.com/Norm-","followers_url":"https://api.github.com/users/Norm-/followers","following_url":"https://api.github.com/users/Norm-/following{/other_user}","gists_url":"https://api.github.com/users/Norm-/gists{/gist_id}","starred_url":"https://api.github.com/users/Norm-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Norm-/subscriptions","organizations_url":"https://api.github.com/users/Norm-/orgs","repos_url":"https://api.github.com/users/Norm-/repos","events_url":"https://api.github.com/users/Norm-/events{/privacy}","received_events_url":"https://api.github.com/users/Norm-/received_events","type":"User","site_admin":false},"created_at":"2016-10-12T06:20:14Z","updated_at":"2016-10-12T06:20:14Z","body":"@dmackerman \r\n\r\nI ran into this issue while using another lib. \"window\" or \"navigator\" not found happens a lot.\r\n\r\nAdmittedly, I don't exactly remember how I solved it in that particular instance. I remember I played around with these, though - https://webpack.github.io/docs/configuration.html#target"}}
{"actor":{"display_login":"Norm-"}}