{"action":"created","issue":{"url":"https://api.github.com/repos/parcel-bundler/parcel/issues/941","repository_url":"https://api.github.com/repos/parcel-bundler/parcel","labels_url":"https://api.github.com/repos/parcel-bundler/parcel/issues/941/labels{/name}","comments_url":"https://api.github.com/repos/parcel-bundler/parcel/issues/941/comments","events_url":"https://api.github.com/repos/parcel-bundler/parcel/issues/941/events","html_url":"https://github.com/parcel-bundler/parcel/issues/941","id":302042992,"number":941,"title":"Importing a CSS Module returns an empty object.","user":{"login":"pietmichal","id":4310372,"avatar_url":"https://avatars0.githubusercontent.com/u/4310372?v=4","gravatar_id":"","url":"https://api.github.com/users/pietmichal","html_url":"https://github.com/pietmichal","followers_url":"https://api.github.com/users/pietmichal/followers","following_url":"https://api.github.com/users/pietmichal/following{/other_user}","gists_url":"https://api.github.com/users/pietmichal/gists{/gist_id}","starred_url":"https://api.github.com/users/pietmichal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pietmichal/subscriptions","organizations_url":"https://api.github.com/users/pietmichal/orgs","repos_url":"https://api.github.com/users/pietmichal/repos","events_url":"https://api.github.com/users/pietmichal/events{/privacy}","received_events_url":"https://api.github.com/users/pietmichal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-03T23:51:45Z","updated_at":"2018-03-04T00:23:10Z","closed_at":null,"author_association":"NONE","body":"**Choose one:** is this a 🐛 bug report or 🙋 feature request?\r\n🐛 bug report\r\n\r\n<!--- Provide a general summary of the issue in the title above -->\r\n\r\n### 🎛 Configuration (.babelrc, package.json, cli command)\r\n\r\n*package.json*\r\n```js\r\n{\r\n  \"scripts\": {\r\n    \"start\": \"parcel ./src/index.html\",\r\n    \"build\": \"parcel build ./src/index.html --public-url ./\"\r\n  },\r\n  \"dependencies\": {\r\n    \"@types/react\": \"16.0.40\",\r\n    \"@types/react-dom\": \"16.0.4\",\r\n    \"@types/react-router\": \"4.0.22\",\r\n    \"@types/react-router-dom\": \"4.2.4\",\r\n    \"autoprefixer\": \"^8.1.0\",\r\n    \"axios\": \"0.18.0\",\r\n    \"express\": \"4.16.2\",\r\n    \"fontawesome\": \"4.7.2\",\r\n    \"parcel-bundler\": \"1.6.2\",\r\n    \"postcss-modules\": \"^1.1.0\",\r\n    \"react\": \"16.2.0\",\r\n    \"react-dom\": \"16.2.0\",\r\n    \"react-hot-loader\": \"4.0.0\",\r\n    \"react-router\": \"4.2.0\",\r\n    \"react-router-dom\": \"4.2.2\",\r\n    \"react-transition-group\": \"2.2.1\",\r\n    \"typescript\": \"2.7.2\"\r\n  },\r\n  \"devDependencies\": {\r\n    \"@types/jest\": \"22.1.4\",\r\n    \"jest\": \"22.4.2\",\r\n    \"prettier\": \"1.11.1\",\r\n    \"ts-jest\": \"22.4.1\"\r\n  },\r\n  \"jest\": {\r\n    \"transform\": {\r\n      \"^.+\\\\.tsx?$\": \"ts-jest\"\r\n    },\r\n    \"testRegex\": \"(/__tests__/.*|(\\\\.|/)(test|spec))\\\\.(jsx?|tsx?)$\",\r\n    \"moduleFileExtensions\": [\"ts\", \"tsx\", \"js\", \"jsx\", \"json\"]\r\n  },\r\n  \"browserslist\": [\"last 2 Chrome versions\"]\r\n}\r\n```\r\n*postcss.config.js*\r\n```js\r\nmodule.export = {\r\n  modules: true,\r\n  plugins: {\r\n    autoprefixer: {\r\n      grid: true\r\n    }\r\n  }\r\n};\r\n```\r\n\r\n### 🤔 Expected Behavior\r\n\r\nBoth development and production builds logging an object with prefixed css class.\r\n\r\n### 😯 Current Behavior\r\n\r\nBoth development and production builds are logging an empty object (`{}`) into the console.\r\n\r\n### 💁 Possible Solution\r\n\r\n🤷\r\n\r\n### 🔦 Context\r\n\r\nI'm just trying to add CSS modules into my app based on information from your documentation.\r\n\r\n### 💻 Code Sample\r\n\r\nMy index.tsx script requires a css module.\r\n```js\r\nconst style = require(\"./index.css\");\r\nconsole.log(style);\r\n```\r\n*index.css*\r\n```css\r\n.test {\r\n  margin-top: 200px;\r\n}\r\n```\r\n\r\n### 🌍 Your Environment\r\n\r\n| Software         | Version(s) |\r\n| ---------------- | ---------- |\r\n| Parcel           | 1.6.2\r\n| Node             | 9.2.0\r\n| npm/Yarn         | yarn 1.3.2\r\n| Operating System | Windows 10\r\n\r\n<!-- Love parcel? Please consider supporting our collective:\r\n👉  https://opencollective.com/parcel/donate -->\r\n"},"comment":{"url":"https://api.github.com/repos/parcel-bundler/parcel/issues/comments/370191100","html_url":"https://github.com/parcel-bundler/parcel/issues/941#issuecomment-370191100","issue_url":"https://api.github.com/repos/parcel-bundler/parcel/issues/941","id":370191100,"user":{"login":"fathyb","id":5746414,"avatar_url":"https://avatars1.githubusercontent.com/u/5746414?v=4","gravatar_id":"","url":"https://api.github.com/users/fathyb","html_url":"https://github.com/fathyb","followers_url":"https://api.github.com/users/fathyb/followers","following_url":"https://api.github.com/users/fathyb/following{/other_user}","gists_url":"https://api.github.com/users/fathyb/gists{/gist_id}","starred_url":"https://api.github.com/users/fathyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fathyb/subscriptions","organizations_url":"https://api.github.com/users/fathyb/orgs","repos_url":"https://api.github.com/users/fathyb/repos","events_url":"https://api.github.com/users/fathyb/events{/privacy}","received_events_url":"https://api.github.com/users/fathyb/received_events","type":"User","site_admin":false},"created_at":"2018-03-04T00:23:10Z","updated_at":"2018-03-04T00:23:10Z","author_association":"MEMBER","body":"Does it work if you remove `postcss.config.js` and add a `.postcssrc` with the code below? \r\n```json\r\n{\r\n    \"modules\": true,\r\n    \"plugins\": {\r\n        \"autoprefixer\": {\r\n            \"grid\": true\r\n        }\r\n    }\r\n}\r\n```"}}
{"actor":{"display_login":"fathyb"}}