payload: {"action":"created","issue":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/14305","repository_url":"https://api.github.com/repos/gatsbyjs/gatsby","labels_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/14305/labels{/name}","comments_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/14305/comments","events_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/14305/events","html_url":"https://github.com/gatsbyjs/gatsby/issues/14305","id":448335488,"node_id":"MDU6SXNzdWU0NDgzMzU0ODg=","number":14305,"title":"globbing with sass","user":{"login":"rudietuesdays","id":10843135,"node_id":"MDQ6VXNlcjEwODQzMTM1","avatar_url":"https://avatars2.githubusercontent.com/u/10843135?v=4","gravatar_id":"","url":"https://api.github.com/users/rudietuesdays","html_url":"https://github.com/rudietuesdays","followers_url":"https://api.github.com/users/rudietuesdays/followers","following_url":"https://api.github.com/users/rudietuesdays/following{/other_user}","gists_url":"https://api.github.com/users/rudietuesdays/gists{/gist_id}","starred_url":"https://api.github.com/users/rudietuesdays/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rudietuesdays/subscriptions","organizations_url":"https://api.github.com/users/rudietuesdays/orgs","repos_url":"https://api.github.com/users/rudietuesdays/repos","events_url":"https://api.github.com/users/rudietuesdays/events{/privacy}","received_events_url":"https://api.github.com/users/rudietuesdays/received_events","type":"User","site_admin":false},"labels":[{"id":1038051271,"node_id":"MDU6TGFiZWwxMDM4MDUxMjcx","url":"https://api.github.com/repos/gatsbyjs/gatsby/labels/status:%20awaiting%20author%20response","name":"status: awaiting author response","color":"f7c309","default":false},{"id":1005034763,"node_id":"MDU6TGFiZWwxMDA1MDM0NzYz","url":"https://api.github.com/repos/gatsbyjs/gatsby/labels/status:%20needs%20reproduction","name":"status: needs reproduction","color":"fef2c0","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2019-05-24T20:09:45Z","updated_at":"2019-06-03T20:19:01Z","closed_at":"2019-06-03T20:19:01Z","author_association":"NONE","body":"# Description\r\n\r\nMy build is failing when trying to specify an importer for allowing for globbing sass files. This happens whether I try to use the importer in `gatsby-config.js` or `gatsby-node.js`.\r\n\r\n## Attempt 1\r\n\r\n### Steps to reproduce - `gatsby-config.js`\r\n```\r\nconst globImporter = require('node-sass-glob-importer')\r\n\r\nmodule.exports = {\r\n  plugins: [\r\n    {\r\n      resolve: 'gatsby-plugin-sass',\r\n      options: {\r\n        importer: globImporter(),\r\n      },\r\n    },\r\n  ]\r\n}\r\n```\r\n\r\n### Expected result\r\n\r\nSuccessfully compile globbed scss files.\r\n\r\n### Actual result\r\n\r\n```\r\nModule build failed (from ./node_modules/sass-loader/lib/loader.js):\r\n\r\n'use strict';\r\n^\r\n      Invalid CSS after \"'\": expected 1 selector or at-rule, was \"'use strict';\"\r\n```\r\n\r\n## Attempt 2\r\n\r\n### Steps to reproduce - `gatsby-node.js` \r\nI also tried overriding the webpack settings and modifying the webpack config. For this option, I removed the importer option from `gatsby-plugin-sass`.\r\n\r\n```\r\nconst globImporter = require('node-sass-glob-importer')\r\nconst MiniCssExtractPlugin = require('mini-css-extract-plugin');\r\n\r\nexports.onCreateWebpackConfig = ({\r\n  stage,\r\n  rules,\r\n  loaders,\r\n  plugins,\r\n  actions,\r\n  getConfig\r\n}) => {\r\n  actions.replaceWebpackConfig({\r\n    resolve: {\r\n      modules: [path.resolve(__dirname, \"src\"), \"node_modules\"],\r\n    },\r\n    module: {\r\n      rules: [\r\n        {\r\n          test:/\\.(s*)css$/,\r\n          resolve: {\r\n            extensions: ['.scss', '.sass'],\r\n          },\r\n          use: [\r\n            'style-loader!css-loader',\r\n            {\r\n              loader: MiniCssExtractPlugin.loader(),\r\n              options: {\r\n                importer: globImporter(),\r\n              }\r\n            },\r\n            {\r\n              loader: 'sass-loader',\r\n              options: {\r\n                importer: globImporter(),\r\n              }\r\n            },\r\n          ],\r\n        },\r\n      ],\r\n    },\r\n    plugins: [\r\n      new MiniCssExtractPlugin({\r\n        // Options similar to the same options in webpackOptions.output\r\n        // both options are optional\r\n        filename: isDevelopment ? '[name].css' : '[name].[hash].css',\r\n        chunkFilename: isDevelopment ? '[id].css' : '[id].[hash].css'\r\n      }),\r\n    ]\r\n  })\r\n}\r\n```\r\n\r\n### Expected result\r\n\r\nSuccessfully compile globbed scss files.\r\n\r\n### Actual result\r\n```\r\nModule build failed (from ./node_modules/gatsby-plugin-netlify-cms/node_modules/mini-css-extract-plugin/dist/loader.js):\r\nModuleBuildError: Module build failed (from ./node_modules/sass-loader/lib/loader.js):\r\n\r\n@import 'vars/*';\r\n^\r\n      File to import not found or unreadable: vars/*.\r\n```\r\n\r\n### Environment\r\n\r\n```\r\nSystem:\r\n    OS: macOS High Sierra 10.13.6\r\n    CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz\r\n    Shell: 5.3 - /bin/zsh\r\n  Binaries:\r\n    Node: 8.10.0 - ~/.asdf/installs/nodejs/8.10.0/bin/node\r\n    Yarn: 1.16.0 - /usr/local/bin/yarn\r\n    npm: 5.6.0 - ~/.asdf/installs/nodejs/8.10.0/bin/npm\r\n  Languages:\r\n    Python: 2.7.10 - /usr/bin/python\r\n  Browsers:\r\n    Chrome: 74.0.3729.169\r\n    Firefox: 66.0.3\r\n    Safari: 12.1\r\n  npmPackages:\r\n    gatsby: ^2.1.34 => 2.7.1 \r\n    gatsby-image: ^2.0.23 => 2.1.0 \r\n    gatsby-plugin-netlify: ^2.0.6 => 2.0.17 \r\n    gatsby-plugin-netlify-cms: ^4.0.0 => 4.0.1 \r\n    gatsby-plugin-purgecss: ^3.1.0 => 3.1.1 \r\n    gatsby-plugin-react-helmet: ^3.0.4 => 3.0.12 \r\n    gatsby-plugin-sass: ^2.0.7 => 2.0.11 \r\n    gatsby-plugin-sharp: ^2.0.15 => 2.1.0 \r\n    gatsby-remark-copy-linked-files: ^2.0.7 => 2.0.12 \r\n    gatsby-remark-images: ^3.0.1 => 3.0.12 \r\n    gatsby-remark-relative-images: ^0.2.1 => 0.2.2 \r\n    gatsby-source-filesystem: ^2.0.26 => 2.0.37 \r\n    gatsby-transformer-remark: ^2.3.4 => 2.3.12 \r\n    gatsby-transformer-sharp: ^2.1.9 => 2.1.19 \r\n  npmGlobalPackages:\r\n    gatsby-cli: 2.5.14\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/comments/498410453","html_url":"https://github.com/gatsbyjs/gatsby/issues/14305#issuecomment-498410453","issue_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/14305","id":498410453,"node_id":"MDEyOklzc3VlQ29tbWVudDQ5ODQxMDQ1Mw==","user":{"login":"jonniebigodes","id":22988955,"node_id":"MDQ6VXNlcjIyOTg4OTU1","avatar_url":"https://avatars1.githubusercontent.com/u/22988955?v=4","gravatar_id":"","url":"https://api.github.com/users/jonniebigodes","html_url":"https://github.com/jonniebigodes","followers_url":"https://api.github.com/users/jonniebigodes/followers","following_url":"https://api.github.com/users/jonniebigodes/following{/other_user}","gists_url":"https://api.github.com/users/jonniebigodes/gists{/gist_id}","starred_url":"https://api.github.com/users/jonniebigodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonniebigodes/subscriptions","organizations_url":"https://api.github.com/users/jonniebigodes/orgs","repos_url":"https://api.github.com/users/jonniebigodes/repos","events_url":"https://api.github.com/users/jonniebigodes/events{/privacy}","received_events_url":"https://api.github.com/users/jonniebigodes/received_events","type":"User","site_admin":false},"created_at":"2019-06-03T20:19:01Z","updated_at":"2019-06-03T20:19:01Z","author_association":"CONTRIBUTOR","body":"@rudietuesdays no need to thank, glad that you managed to figured it out. Sorry that the issue was with the output of the error and with that being misleading, there are a couple of issues with some similar cases, but some improvements are being made to correct it and give people a more clear picture of what is exactly the issue when generating the build. If you don't mind i'm going to close this issue and i really hope that once you get your project up and running you can submit it to the showcase. Sounds good?"}}
other: {"actor":{"display_login":"jonniebigodes"}}