{"id":19028659,"url":"https://github.com/researchgate/babel-plugin-transform-scss-import-to-string","last_synced_at":"2025-04-23T15:43:48.120Z","repository":{"id":37251658,"uuid":"111538119","full_name":"researchgate/babel-plugin-transform-scss-import-to-string","owner":"researchgate","description":"Babel plugin for inlining Sass imports into transpiled strings","archived":false,"fork":false,"pushed_at":"2023-07-18T20:10:42.000Z","size":2449,"stargazers_count":10,"open_issues_count":14,"forks_count":1,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-15T02:05:18.227Z","etag":null,"topics":["babel","babel-plugin","sass","scss","transform"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/researchgate.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-21T11:08:43.000Z","updated_at":"2024-01-17T13:10:53.000Z","dependencies_parsed_at":"2024-06-18T22:47:30.684Z","dependency_job_id":"9acf9041-dcd0-4b46-b971-88928b4019eb","html_url":"https://github.com/researchgate/babel-plugin-transform-scss-import-to-string","commit_stats":{"total_commits":156,"total_committers":10,"mean_commits":15.6,"dds":0.4294871794871795,"last_synced_commit":"05b303195acb014e1e4a5ebea1f40fb7b77749ab"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/researchgate%2Fbabel-plugin-transform-scss-import-to-string","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/researchgate%2Fbabel-plugin-transform-scss-import-to-string/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/researchgate%2Fbabel-plugin-transform-scss-import-to-string/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/researchgate%2Fbabel-plugin-transform-scss-import-to-string/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/researchgate","download_url":"https://codeload.github.com/researchgate/babel-plugin-transform-scss-import-to-string/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250462868,"owners_count":21434681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["babel","babel-plugin","sass","scss","transform"],"created_at":"2024-11-08T21:11:58.972Z","updated_at":"2025-04-23T15:43:48.097Z","avatar_url":"https://github.com/researchgate.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# babel-plugin-transform-scss-import-to-string\n\n\u003ca href=\"https://travis-ci.com/researchgate/babel-plugin-transform-scss-import-to-string\"\u003e\u003cimg alt=\"Build Status\" src=\"https://travis-ci.com/researchgate/babel-plugin-transform-scss-import-to-string.svg?branch=master\"\u003e\u003c/a\u003e\n\u003ca href=\"https://codecov.io/gh/researchgate/babel-plugin-transform-scss-import-to-string\"\u003e\u003cimg alt=\"Codecov\" src=\"https://img.shields.io/codecov/c/github/researchgate/babel-plugin-transform-scss-import-to-string.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://greenkeeper.io/\"\u003e\u003cimg alt=\"Greenkeeper badge\" src=\"https://badges.greenkeeper.io/researchgate/babel-plugin-transform-scss-import-to-string.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/@researchgate/babel-plugin-transform-scss-import-to-string\"\u003e\u003cimg alt=\"NPM version\" src=\"https://img.shields.io/npm/v/@researchgate/babel-plugin-transform-scss-import-to-string.svg\"\u003e\u003c/a\u003e\n\nBabel transform plugin for replacing \\*.scss imports with static variable\ndeclaration as css string.\n\n## Example\n\n```js\nimport sideEffectStyles from './styles.sass';\n// vvv\nconst sideEffectStyles = '.foo { color: red; }';\n```\n\n## Quick start\n\nInstall the plugin first:\n\n```sh\n# yarn\nyarn add --dev @researchgate/babel-plugin-transform-scss-import-to-string\n\n# npm\nnpm install --save-dev @researchgate/babel-plugin-transform-scss-import-to-string\n```\n\nAdd it to your babel configuration:\n\n```json\n{\n  \"plugins\": [\"@researchgate/babel-plugin-transform-scss-import-to-string\"]\n}\n```\n\nOr with custom [`node-sass` options](https://github.com/sass/node-sass#options):\n\n```json\n{\n  \"plugins\": [\n    [\n      \"@researchgate/babel-plugin-transform-scss-import-to-string\",\n      { \"precision\": 3 }\n    ]\n  ]\n}\n```\n\nImport \\*.scss files:\n\n```scss\n// foo.scss\n$bar: 42px;\n.foo {\n  font-size: $bar;\n}\n```\n\n```js\n// foo.js\nimport foo from './foo.scss';\nconsole.log(foo); // -\u003e .foo { font-size: 42px; }\n```\n\n## Requirements\n\n- `node-sass`, which you should install explicitly\n- `@babel/core`, which you should already have with babel configured\n\n## Caveats\n\n- This module shouldn't be used with webpack and sass-loader since babel\n  transform would take first place in build process.\n- Every import transpiled with node-sass as an independent file, so you have to\n  explicitly import dependencies if you used to have common context before.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresearchgate%2Fbabel-plugin-transform-scss-import-to-string","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fresearchgate%2Fbabel-plugin-transform-scss-import-to-string","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresearchgate%2Fbabel-plugin-transform-scss-import-to-string/lists"}