{"name":"gatsby-1-config-css-modules","version":"1.1.0-alpha.5182142b","description":"CSS Modules configuration for Gatsby v1 plugins","main":"index.js","scripts":{"build":"babel src --out-dir . --ignore **/__tests__/**","watch":"babel -w src --out-dir . --ignore **/__tests__/**","prepublish":"cross-env NODE_ENV=production npm run build"},"keywords":["gatsby"],"author":{"name":"Ming Aldrich-Gan","email":"mingaldrichgan@gmail.com"},"license":"MIT","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"},"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.5182142b","dist":{"shasum":"7ef182302df56c1fda8d0edc8ed6e2be44833a1b","tarball":"http://registry-npm.ywwl.com/gatsby-1-config-css-modules/download/gatsby-1-config-css-modules-1.1.0-alpha.5182142b.tgz","fileCount":6,"unpackedSize":3224,"integrity":"sha512-jhRmiP4vMd6UOHxeCxU7rHzklDGIQpZ+Nxf7ArbvSycYGWSpX178QUzV/oEGlY2XGuoq7M0rhlse74zu5abigw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBEFcpecFtia4fXheEHJ4fY/4nRT6g47adHu0VTGUSKLAiEApFnbiEvvHfkxAq+Mt7Z7sN8FZBxws2VMe8kAsK80cgA="}],"size":1455,"noattachment":false,"key":"/gatsby-1-config-css-modules/-/gatsby-1-config-css-modules-1.1.0-alpha.5182142b.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.5182142b_1518322309032_0.9169354593184089"},"_hasShrinkwrap":false,"publish_time":1518322309171,"_cnpm_publish_time":1518322309171,"dist-tags":{"canary":"1.1.0-alpha.e9c3027b","latest":"1.0.11","next":"1.0.10-13"}}