{"name":"gatsby-1-config-css-modules","description":"CSS Modules configuration for Gatsby v1 plugins","version":"1.1.0-alpha.bb258cb5","author":{"name":"Ming Aldrich-Gan","email":"mingaldrichgan@gmail.com"},"bugs":{"url":"https://github.com/gatsbyjs/gatsby/issues"},"dependencies":{"@babel/runtime":"^7.0.0-beta.38"},"devDependencies":{"@babel/cli":"^7.0.0-beta.38","@babel/core":"^7.0.0-beta.38","cross-env":"^5.0.5"},"homepage":"https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-1-config-css-modules#readme","keywords":["gatsby"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"https://github.com/gatsbyjs/gatsby.git"},"scripts":{"build":"babel src --out-dir . --ignore __tests__","prepublish":"cross-env NODE_ENV=production npm run build","watch":"babel -w src --out-dir . --ignore __tests__"},"readmeFilename":"README.md","readme":"# gatsby-1-config-css-modules\n\nCSS Modules configuration for Gatsby v1 plugins\n\n## Install\n\n`yarn add --dev gatsby-plugin-sass`\n\n## How to use\n\nExample from [`gatsby-plugin-sass`](../gatsby-plugin-sass/):\n\n```javascript\n// in gatsby-node.js\nconst { cssModulesConfig } = require(\"gatsby-1-config-css-modules\");\n\nexports.modifyWebpackConfig = ({ config, stage }, { precision }) => {\n  const sassFiles = /\\.s[ac]ss$/;\n  const sassModulesFiles = /\\.module\\.s[ac]ss$/;\n  const sassLoader = precision ? `sass?precision=${precision}` : `sass`;\n\n  switch (stage) {\n    case `develop`: {\n      config.loader(`sass`, {\n        test: sassFiles,\n        exclude: sassModulesFiles,\n        loaders: [`style`, `css`, sassLoader],\n      });\n\n      config.loader(`sassModules`, {\n        test: sassModulesFiles,\n        loaders: [`style`, cssModulesConfig(stage), sassLoader],\n      });\n      return config;\n    }\n\n    // etc.\n  }\n};\n```\n","_id":"gatsby-1-config-css-modules@1.1.0-alpha.bb258cb5","dist":{"shasum":"81511ff69472dbd6955c4d366fbec7347a2041d6","tarball":"http://registry-npm.ywwl.com/gatsby-1-config-css-modules/download/gatsby-1-config-css-modules-1.1.0-alpha.bb258cb5.tgz","fileCount":6,"unpackedSize":3486,"integrity":"sha512-DS+SLI1PEyM7x08szP7wwTsQcxtDKYSXxjzAD1Z8LgbKNVhLx/57sJ5AU50t0Eff6dJNYmasZODTSvAKZm/dyQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCE8aqk6DhsMkhet4KcmA6qsV7YG5kr1WRErPgsqBGq+AIgc9KW5njP9+NjWCVbtyvqeSn31sWuRq/HN1Tf6XqXSGA="}],"size":1537,"noattachment":false,"key":"/gatsby-1-config-css-modules/-/gatsby-1-config-css-modules-1.1.0-alpha.bb258cb5.tgz"},"maintainers":[{"email":"mathews.kyle@gmail.com","name":"kylemathews"},{"email":"monastic.panic@gmail.com","name":"monastic.panic"}],"_npmUser":{"name":"kylemathews","email":"mathews.kyle@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-1-config-css-modules_1.1.0-alpha.bb258cb5_1518740947437_0.8715342268642101"},"_hasShrinkwrap":false,"publish_time":1518740947491,"_cnpm_publish_time":1518740947491,"dist-tags":{"canary":"1.1.0-alpha.e9c3027b","latest":"1.0.11","next":"1.0.10-13"}}