{"action":"created","issue":{"url":"https://api.github.com/repos/js-next/react-style-webpack-plugin/issues/9","labels_url":"https://api.github.com/repos/js-next/react-style-webpack-plugin/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/js-next/react-style-webpack-plugin/issues/9/comments","events_url":"https://api.github.com/repos/js-next/react-style-webpack-plugin/issues/9/events","html_url":"https://github.com/js-next/react-style-webpack-plugin/issues/9","id":52660099,"number":9,"title":"not working ...","user":{"login":"rpflorence","id":100200,"avatar_url":"https://avatars.githubusercontent.com/u/100200?v=3","gravatar_id":"","url":"https://api.github.com/users/rpflorence","html_url":"https://github.com/rpflorence","followers_url":"https://api.github.com/users/rpflorence/followers","following_url":"https://api.github.com/users/rpflorence/following{/other_user}","gists_url":"https://api.github.com/users/rpflorence/gists{/gist_id}","starred_url":"https://api.github.com/users/rpflorence/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpflorence/subscriptions","organizations_url":"https://api.github.com/users/rpflorence/orgs","repos_url":"https://api.github.com/users/rpflorence/repos","events_url":"https://api.github.com/users/rpflorence/events{/privacy}","received_events_url":"https://api.github.com/users/rpflorence/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/js-next/react-style-webpack-plugin/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"SanderSpies","id":1114117,"avatar_url":"https://avatars.githubusercontent.com/u/1114117?v=3","gravatar_id":"","url":"https://api.github.com/users/SanderSpies","html_url":"https://github.com/SanderSpies","followers_url":"https://api.github.com/users/SanderSpies/followers","following_url":"https://api.github.com/users/SanderSpies/following{/other_user}","gists_url":"https://api.github.com/users/SanderSpies/gists{/gist_id}","starred_url":"https://api.github.com/users/SanderSpies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SanderSpies/subscriptions","organizations_url":"https://api.github.com/users/SanderSpies/orgs","repos_url":"https://api.github.com/users/SanderSpies/repos","events_url":"https://api.github.com/users/SanderSpies/events{/privacy}","received_events_url":"https://api.github.com/users/SanderSpies/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2014-12-22T15:40:03Z","updated_at":"2015-01-14T07:59:20Z","closed_at":null,"body":"With this config:\r\n\r\n```js\r\nvar webpack = require('webpack');\r\nvar ReactStylePlugin = require('react-style-webpack-plugin');\r\n\r\nvar PRODUCTION = process.env.NODE_ENV === 'production';\r\n\r\nvar plugins = function () {\r\n  var all = [\r\n    new webpack.optimize.CommonsChunkPlugin('vendor', 'assets/vendor.js'),\r\n    new ReactStylePlugin('assets/app.css')\r\n  ];\r\n\r\n  var production = [\r\n    new webpack.optimize.UglifyJsPlugin({compress: {warnings: false}}),\r\n    new webpack.optimize.DedupePlugin(),\r\n    new webpack.DefinePlugin({\r\n      \"process.env\": { NODE_ENV: JSON.stringify(\"production\") }\r\n    }),\r\n    new webpack.NoErrorsPlugin()\r\n  ];\r\n\r\n  return PRODUCTION ? all.concat(production) : all;\r\n};\r\n\r\nmodule.exports = {\r\n\r\n  entry: {\r\n    app: \"./app/main.js\",\r\n    vendor: [\r\n      'react',\r\n      'react-router',\r\n      'client-firebase',\r\n      'firebase-simple-login'\r\n    ]\r\n  },\r\n\r\n  output: {\r\n    filename: \"assets/app.js\",\r\n    publicPath: \"/\"\r\n  },\r\n\r\n  devtool: PRODUCTION ? null : 'source-map',\r\n\r\n  module: {\r\n    loaders: [\r\n      { test: /\\.js$/, loader: 'jsx-loader?harmony&insertPragma=React.DOM' },\r\n      { test: require.resolve('react'), loader: 'expose?React' },\r\n      { test: /\\.md$/, loader: \"html!markdown\" },\r\n      { test: /\\.js$/, loader: ReactStylePlugin.loader() }\r\n    ]\r\n  },\r\n\r\n  plugins: plugins()\r\n\r\n};\r\n```\r\n\r\nI get this error:\r\n\r\n```\r\nTypeError: Object #<Object> has no method 'replace'\r\n    at Tapable.<anonymous> (/Users/ryanf/Code/playground/life-track/node_modules/webpack-dev-server/node_modules/webpack/lib/NormalModuleFactory.js:45:26)\r\n    at Tapable.applyPluginsAsyncWaterfall (/Users/ryanf/Code/playground/life-track/node_modules/webpack-dev-server/node_modules/webpack/node_modules/tapable/lib/Tapable.js:77:69)\r\n    at Tapable.NormalModuleFactory.create (/Users/ryanf/Code/playground/life-track/node_modules/webpack-dev-server/node_modules/webpack/lib/NormalModuleFactory.js:27:7)\r\n    at Tapable.<anonymous> (/Users/ryanf/Code/playground/life-track/node_modules/webpack-dev-server/node_modules/webpack/lib/Compilation.js:198:11)\r\n    at /Users/ryanf/Code/playground/life-track/node_modules/webpack-dev-server/node_modules/webpack/node_modules/async/lib/async.js:125:13\r\n    at Array.forEach (native)\r\n    at _each (/Users/ryanf/Code/playground/life-track/node_modules/webpack-dev-server/node_modules/webpack/node_modules/async/lib/async.js:46:24)\r\n    at Object.async.each (/Users/ryanf/Code/playground/life-track/node_modules/webpack-dev-server/node_modules/webpack/node_modules/async/lib/async.js:124:9)\r\n    at Tapable.Compilation.addModuleDependencies (/Users/ryanf/Code/playground/life-track/node_modules/webpack-dev-server/node_modules/webpack/lib/Compilation.js:168:8)\r\n    at Tapable.Compilation.processModuleDependencies (/Users/ryanf/Code/playground/life-track/node_modules/webpack-dev-server/node_modules/webpack/lib/Compilation.js:156:7)\r\n```\r\n\r\nThe line with an error (`webpack/lib/NormalModuleFactory.js:45`) is trying to do this:\r\n\r\n```js\r\nvar elements = request.replace(/^-?!+/, \"\").replace(/!!+/g, \"!\").split(\"!\");\r\n```\r\n\r\nWithout the `ReactStylePlugin('assets/app.css')` in `plugins` a request is just a path to a module like this:\r\n\r\n```\r\n./utils/createRouter\r\n```\r\n\r\nBut when the react style plugin is added, the request is the `entry` config (?)\r\n\r\n```js\r\n{ app: \r\n   [ '/Users/ryanf/Code/playground/life-track/node_modules/webpack-dev-server/client/index.js?http://localhost:2992',\r\n     './app/main.js' ],\r\n  vendor: \r\n   [ '/Users/ryanf/Code/playground/life-track/node_modules/webpack-dev-server/client/index.js?http://localhost:2992',\r\n     'react',\r\n     'react-router',\r\n     'client-firebase',\r\n     'firebase-simple-login' ] }\r\n```\r\n\r\nThis is all I know."},"comment":{"url":"https://api.github.com/repos/js-next/react-style-webpack-plugin/issues/comments/69881002","html_url":"https://github.com/js-next/react-style-webpack-plugin/issues/9#issuecomment-69881002","issue_url":"https://api.github.com/repos/js-next/react-style-webpack-plugin/issues/9","id":69881002,"user":{"login":"SanderSpies","id":1114117,"avatar_url":"https://avatars.githubusercontent.com/u/1114117?v=3","gravatar_id":"","url":"https://api.github.com/users/SanderSpies","html_url":"https://github.com/SanderSpies","followers_url":"https://api.github.com/users/SanderSpies/followers","following_url":"https://api.github.com/users/SanderSpies/following{/other_user}","gists_url":"https://api.github.com/users/SanderSpies/gists{/gist_id}","starred_url":"https://api.github.com/users/SanderSpies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SanderSpies/subscriptions","organizations_url":"https://api.github.com/users/SanderSpies/orgs","repos_url":"https://api.github.com/users/SanderSpies/repos","events_url":"https://api.github.com/users/SanderSpies/events{/privacy}","received_events_url":"https://api.github.com/users/SanderSpies/received_events","type":"User","site_admin":false},"created_at":"2015-01-14T07:59:19Z","updated_at":"2015-01-14T07:59:19Z","body":"From what I can see here, we're not handling the entry propery of webpack config properly. If you use only a string, eg.  entry:  `\"./app/main.js\"` it will probably work. I don't have the complete setup locally so can't fully confirm if it will solve everything.\r\n\r\nOf course, this should just work - so I will fix this."}}