{"_id":"rollup-plugin-keep-css-imports","_rev":"17-fe19ad622a649e3e29e5b67be0f84da7","name":"rollup-plugin-keep-css-imports","dist-tags":{"latest":"1.0.0","next":"1.0.0-rc6"},"versions":{"0.0.3":{"name":"rollup-plugin-keep-css-imports","version":"0.0.3","description":"Rollup plugin that allows to maintain the original structure of style imports without altering them during the bundling process","main":"dist/index.cjs","module":"dist/index.mjs","exports":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"keywords":["rollup","rollup-plugin","css-modules","sass","scss","keep","preserve","imports"],"homepage":"https://github.com/SLTKA/rollup-plugin-keep-css-imports","author":{"name":"Alexandr Yeskov"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/SLTKA/rollup-plugin-keep-css-imports.git"},"bugs":{"url":"https://github.com/SLTKA/rollup-plugin-keep-css-imports/issues"},"scripts":{"prebuild":"rimraf -rf dist/*","build":"rollup -c","test":"mocha","pretest":"yarn build"},"devDependencies":{"eslint":"^8.38.0","eslint-config-prettier":"^8.8.0","eslint-plugin-mocha":"^10.1.0","eslint-plugin-prettier":"^4.2.1","mocha":"^10.2.0","prettier":"^2.8.7","rimraf":"^2.6.3","rollup":"^3.10.0","sass":"^1.62.0"},"dependencies":{"magic-string":"^0.30.0"},"gitHead":"37ab8c472d236c775c110a323e4621ee4631e6f0","_id":"rollup-plugin-keep-css-imports@0.0.3","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-vuQj4qFd19Wxfd44N07HsEbWFjxrK4LQf6iS0z6pNjfPGZl5v8t6KWTS9ajO27v5PVLxXe1X0eMYSl9eYNyZvA==","shasum":"d31c7fd3352242374f66254eef65fb8f454306cb","tarball":"https://registry.npmjs.org/rollup-plugin-keep-css-imports/-/rollup-plugin-keep-css-imports-0.0.3.tgz","fileCount":5,"unpackedSize":23813,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB32b+8l5aY2nZ0H+GUM7zuK2rHwSQJXaZHd++dIaywiAiBR8NjRY4z450jucJ9sCoIxGOK1G6lTc/WU4cjn3Vs+hA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkOCnYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrhDA/+I5Sj/E+ZaZwgC9f+aIcrestNJQGy3kl3JXZDTKGzMCr9a5HM\r\nk1Vpxk5Yq+2wKEIwsINN2lQlONBfwV3ovVkhGFULfx5y7Xw8JAmAXefzvovb\r\nvbj2dBHgU1UWHUwD7JRy2AgFIFXmb1aA8SMmKRFYwNslyp/dE29z2dWKXYVb\r\nnYCtTqsr6rQkhYQyDorxU/S+QXTfPsGAU2laZrzpahMjYdBWVYkYxHDMwRsh\r\nWbSvItWgRCP13zvzLZH+2ZdZvW5egRW2cHzcrVyycsDChZszefhXWRdLTN+j\r\nnbZjWE1i58aUISjS/xdvjYUvbeViLG9w1l/cd3KT6RhSdQtK3gfr+nJMsdma\r\nkOEGL6INW5gISIfOMqxeUi+iTqMnJVotqKLNYTj9muzUAZTz4K2DavOVr6F+\r\naJuE1+o/bTueDJDnsgkeBvVx/B6r5FycFx7ZijKr0co++blv3dMTaRn7ck3k\r\nofnmihiQ/078gZTtwCRetGDgCQr8PJCPYmusljLIl5+1+9gsrgs1Bs2r89k+\r\nZurVNWoqG680unzwSvLuuEmDA+D3eGb/sarv8myBO5izE2Ngng+2JeKEslHD\r\nUZUhYX2dyKW2w9fahDsmRHxBnKZVBqjp/KO45pdCJ7b3iGTtQBdVno60X5Ea\r\nhw06vpdns2WWxo9CLWBZQz+exmd42sCoHVM=\r\n=vFld\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"sltk","email":"dev@yeskov.com"},"directories":{},"maintainers":[{"name":"sltk","email":"dev@yeskov.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-keep-css-imports_0.0.3_1681402328050_0.6254004722019229"},"_hasShrinkwrap":false},"0.0.4":{"name":"rollup-plugin-keep-css-imports","version":"0.0.4","description":"Rollup plugin that allows to maintain the original structure of style imports without altering them during the bundling process","type":"module","main":"dist/index.cjs","module":"dist/index.mjs","exports":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"keywords":["rollup","rollup-plugin","css-modules","sass","scss","keep","preserve","imports"],"homepage":"https://github.com/SLTKA/rollup-plugin-keep-css-imports","author":{"name":"Alexandr Yeskov"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/SLTKA/rollup-plugin-keep-css-imports.git"},"bugs":{"url":"https://github.com/SLTKA/rollup-plugin-keep-css-imports/issues"},"scripts":{"prebuild":"rimraf -rf dist/*","build":"rollup -c","test":"mocha","pretest":"yarn build"},"devDependencies":{"eslint":"^8.38.0","eslint-config-prettier":"^8.8.0","eslint-plugin-mocha":"^10.1.0","eslint-plugin-prettier":"^4.2.1","mocha":"^10.2.0","prettier":"^2.8.7","rimraf":"^2.6.3","rollup":"^3.10.0","sass":"^1.62.0"},"dependencies":{"magic-string":"^0.30.0"},"gitHead":"02f461227a023c2496f6e413ee92aed7873d3dfc","_id":"rollup-plugin-keep-css-imports@0.0.4","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-RlMq3ZKxJUt42ygjW07EzBQguvxoNnMMpc47nvLuG45kIV8bxpwIAKSDpxlgoUAJQkRLh03x2q51aIoNspakbQ==","shasum":"89711efb8ca7ca2751c35421478bda67c4209c9d","tarball":"https://registry.npmjs.org/rollup-plugin-keep-css-imports/-/rollup-plugin-keep-css-imports-0.0.4.tgz","fileCount":5,"unpackedSize":25030,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICOiP9kyQIh97otzleGThjIXYpQO2fCheIWofsQcKTyKAiBv+3kPT/9V/F/uPM8Byu1nvlpkpJ9jLgsyi958goWrnQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkO/+LACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmokpw//evIe+O6Q+lV8FVoPA+zchH69fAZf5Owp5S6eVtgMkH5PVbMB\r\ncQtkWGQOLjDO2XT+00wCeevlceHUMjJ1mdzT1JDnESidKxR327P/yEMq4n49\r\nPPrjZhhH2+OzvV9+vxFJ6h1aXSQf4ICpjo1caigpe6dIVKN7OTszX6v4mqWB\r\n193PBl6VHMaQzFzxuYU/BoNdRHDrpYGFgYXsF202pND4XMkwB2xkVd417RdC\r\nr+tcAYc32VMqAS8NPfZi4V4CTAJQYuF6E3wVEPy6qcvjEcFEo7Sjdg7xXKt2\r\nsDbsbFVLZBJk2ObivSp+SONjExC7B4kvv0X0gXhj5GqmTILt/8O8gJRS/86M\r\ntPRoH79MUohqZ3HXj7abgEgFFhusW+3mTlH6uoWJLVr73SuSw48RGctMmabb\r\n59Fz7xhN+NSP/Ki+breyc8HeIb/NtiIuUgXlyl4tBfhoeBCkpBMokY9u5vAs\r\nvm7IxhR5vlkEr+pRa399BPnFYbCUIqlrJ7rDXjJS4KuD1EN1QfMZMJ05BzQT\r\nizvDyu0bkF9RK1VP3VU1QbYIU+hrs6vsSef7Sg1IYLZm9DsqiHwTCx8yIZi8\r\nMlsg7QxAxTb9S6/kj2Bao19DJfaUqPHaHYo5q8ENEYSHA9PHDbF9ZCUmuytv\r\nkTV9ziQoYwHW6nVwglk+XvdM/uSJqg+xPgc=\r\n=VF5u\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"sltk","email":"dev@yeskov.com"},"directories":{},"maintainers":[{"name":"sltk","email":"dev@yeskov.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-keep-css-imports_0.0.4_1681653642829_0.6354301931324484"},"_hasShrinkwrap":false},"0.0.5":{"name":"rollup-plugin-keep-css-imports","version":"0.0.5","description":"Rollup plugin that allows to maintain the original structure of style imports without altering them during the bundling process","main":"dist/index.cjs","module":"dist/index.mjs","exports":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"keywords":["rollup","rollup-plugin","css-modules","sass","scss","keep","preserve","imports"],"homepage":"https://github.com/SLTKA/rollup-plugin-keep-css-imports","author":{"name":"Alexandr Yeskov"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/SLTKA/rollup-plugin-keep-css-imports.git"},"bugs":{"url":"https://github.com/SLTKA/rollup-plugin-keep-css-imports/issues"},"scripts":{"prebuild":"rimraf -rf dist/*","build":"rollup -c","test":"mocha","pretest":"yarn build"},"devDependencies":{"eslint":"^8.38.0","eslint-config-prettier":"^8.8.0","eslint-plugin-mocha":"^10.1.0","eslint-plugin-prettier":"^4.2.1","mocha":"^10.2.0","prettier":"^2.8.7","rimraf":"^2.6.3","rollup":"^3.10.0","sass":"^1.62.0"},"dependencies":{"magic-string":"^0.30.0"},"gitHead":"e0a5ce0f5dd184512c6e850fc1ee1722ed93fbc1","_id":"rollup-plugin-keep-css-imports@0.0.5","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-NeQ8zc+5twB2h9ock0nNe34iW+6GhWxh12JyN/QdbcVthdgRHrGHuYZvGo22Uar7SIZXD6x519dk/O6k79UqTw==","shasum":"da55bb2941b17d05ffe514d525e18ae53c2a56a6","tarball":"https://registry.npmjs.org/rollup-plugin-keep-css-imports/-/rollup-plugin-keep-css-imports-0.0.5.tgz","fileCount":5,"unpackedSize":26635,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICAvwC0z2dYU9xgVQ6kcjTBp4T/fjpATXPo6TgeCG40UAiEA4QWyX2lPfZW2O0f7b+kiimWVJPz9iESliEghxMYuCNY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkPewYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpeZg//V5I85kaszF9O2uNngwk7ZF24w6EzUyIQSnx0d620MV6neuH9\r\n/KNrOwdVec+H3N0Gm1dtHNs8MEqKsW7UmessSWVl46p/xYUvzPWNRybkS5c6\r\nostLWI+NWbqZJ67EB7g1DLvzjZs+WQn2cRMHoebT0TJ2iVkkzZEndOg0htCj\r\nUaitA7MVzeb+jK2wmBnkgkFjDX8vhhG0LmSTTYMjiaX3kejHvNf+NOSk8Fpg\r\nXA3ksfSzz2jnukE5ZDdbaz6HP3y2S8J6t83N1SZf6s75HXc9gMD1kO76me/g\r\nc4iowwECxAGcqlV6iT/FNOg/S3OJ3XBrr/zsohDQZG4lNS8lcSa7g5InGr16\r\nKMmN2ZEaf0A/99kRiKdwzZdoDcnwvcmdmEfhm037a8+0MKlWUb6OOSZw4U7+\r\naA7MwyN1vQ9a/Iroa+22yEA+2tN58Xw7jS8sRNOx4jkdAZOWj9lllpbldksY\r\nAmrBOAX9WbomzCblksmf8teTV7M+gfMvbuEWywPQEbVRDsV9ICPBSu9P4JaD\r\nJuzb2jtBUV/V6KxeOVGc9nzpoJ63xQflcD5j+O9ttNQLEUUbpg7hhuV1tnNJ\r\ni65u4Bu6Ie8VNtgcoQVbzp7b2+JTHHnbGtpBo40HrhzBKIKexjyAs3dcWog8\r\nQn4e04JLstfKaQ+D7FoDmVeLdL8mDotz8R8=\r\n=taSN\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"sltk","email":"dev@yeskov.com"},"directories":{},"maintainers":[{"name":"sltk","email":"dev@yeskov.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-keep-css-imports_0.0.5_1681779736021_0.476082860467284"},"_hasShrinkwrap":false},"0.0.6":{"name":"rollup-plugin-keep-css-imports","version":"0.0.6","description":"Rollup plugin that allows to maintain the original structure of style imports without altering them during the bundling process","main":"dist/index.cjs","module":"dist/index.mjs","exports":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"keywords":["rollup","rollup-plugin","css-modules","sass","scss","keep","preserve","imports"],"homepage":"https://github.com/SLTKA/rollup-plugin-keep-css-imports","author":{"name":"Alexandr Yeskov"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/SLTKA/rollup-plugin-keep-css-imports.git"},"bugs":{"url":"https://github.com/SLTKA/rollup-plugin-keep-css-imports/issues"},"scripts":{"prebuild":"rimraf -rf dist/*","build":"rollup -c","test":"mocha","pretest":"yarn build"},"devDependencies":{"eslint":"^8.38.0","eslint-config-prettier":"^8.8.0","eslint-plugin-mocha":"^10.1.0","eslint-plugin-prettier":"^4.2.1","mocha":"^10.2.0","prettier":"^2.8.7","rimraf":"^2.6.3","rollup":"^3.10.0","sass":"^1.62.0"},"dependencies":{"magic-string":"^0.30.0"},"gitHead":"301c3d3fc38866c599ccb60bd857de4fe2f55f20","_id":"rollup-plugin-keep-css-imports@0.0.6","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-xLGkF3Ex+TIwU/IOvHL7curgkuJgXgRD4HL2wPyVxNdfDXL3CFRt5u5aqkkd8gol5FNV8aR5kpTtBFGeCNRz+Q==","shasum":"9ffe171d3de9f166f1d5127eab78095311e8a8c2","tarball":"https://registry.npmjs.org/rollup-plugin-keep-css-imports/-/rollup-plugin-keep-css-imports-0.0.6.tgz","fileCount":5,"unpackedSize":31293,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFJ0JoouUpc20ZID2D5zLqqnZqVnSvVKVBqU1MCEbqrLAiEAwk0MoDYT57OM74zemWPlwcfmfDKqI0xpw6S2RVjxn0c="}]},"_npmUser":{"name":"sltk","email":"dev@yeskov.com"},"directories":{},"maintainers":[{"name":"sltk","email":"dev@yeskov.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-keep-css-imports_0.0.6_1687346798302_0.3836612516165361"},"_hasShrinkwrap":false},"1.0.0-rc1":{"name":"rollup-plugin-keep-css-imports","version":"1.0.0-rc1","description":"Rollup plugin that allows to maintain the original structure of style imports without altering them during the bundling process","main":"dist/index.cjs","module":"dist/index.mjs","exports":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"keywords":["rollup","rollup-plugin","css-modules","sass","scss","keep","preserve","imports"],"homepage":"https://github.com/SLTKA/rollup-plugin-keep-css-imports","author":{"name":"Alexandr Yeskov"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/SLTKA/rollup-plugin-keep-css-imports.git"},"bugs":{"url":"https://github.com/SLTKA/rollup-plugin-keep-css-imports/issues"},"scripts":{"prebuild":"rimraf -rf dist/","build":"rollup -c","test":"mocha","pretest":"yarn build"},"devDependencies":{"eslint":"^8.56.0","eslint-config-prettier":"^9.1.0","eslint-plugin-mocha":"^10.2.0","eslint-plugin-prettier":"^5.1.3","mocha":"^10.2.0","prettier":"^3.2.4","rimraf":"^5.0.5","rollup":"^4.9.5","sass":"^1.70.0"},"dependencies":{"magic-string":"^0.30.5"},"gitHead":"301c3d3fc38866c599ccb60bd857de4fe2f55f20","_id":"rollup-plugin-keep-css-imports@1.0.0-rc1","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-jMaduDOJgfJDRetziE0RTW4cAsDsLOFuRme/z+yaoAlEAijtb60/e0aa6Em9fVUMhjamRPCWu5q5uIgAkOiQkg==","shasum":"cf5ce64517d2aeda42bda5bc26990cd80adc5d04","tarball":"https://registry.npmjs.org/rollup-plugin-keep-css-imports/-/rollup-plugin-keep-css-imports-1.0.0-rc1.tgz","fileCount":5,"unpackedSize":31295,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCu9jWIQXNMn4U4LSKhFZyb8x1WoHRDJfl6naSBycyWmQIhAJa7XDKdi74d54tS3TfcaFuabhndWyxs3F9tPtMHgC0w"}]},"_npmUser":{"name":"sltk","email":"dev@yeskov.com"},"directories":{},"maintainers":[{"name":"sltk","email":"dev@yeskov.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-keep-css-imports_1.0.0-rc1_1705573840874_0.5434379600844317"},"_hasShrinkwrap":false},"1.0.0-rc2":{"name":"rollup-plugin-keep-css-imports","version":"1.0.0-rc2","description":"Rollup plugin that allows to maintain the original structure of style imports without altering them during the bundling process","main":"dist/index.cjs","module":"dist/index.mjs","exports":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"keywords":["rollup","rollup-plugin","css-modules","sass","scss","keep","preserve","imports"],"homepage":"https://github.com/SLTKA/rollup-plugin-keep-css-imports","author":{"name":"Alexandr Yeskov"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/SLTKA/rollup-plugin-keep-css-imports.git"},"bugs":{"url":"https://github.com/SLTKA/rollup-plugin-keep-css-imports/issues"},"scripts":{"prebuild":"rimraf -rf dist/","build":"rollup -c","test":"mocha","pretest":"yarn build"},"devDependencies":{"eslint":"^8.56.0","eslint-config-prettier":"^9.1.0","eslint-plugin-mocha":"^10.2.0","eslint-plugin-prettier":"^5.1.3","mocha":"^10.2.0","prettier":"^3.2.4","rimraf":"^5.0.5","rollup":"^4.9.5","sass":"^1.70.0"},"dependencies":{"magic-string":"^0.30.5"},"readme":"# Rollup Plugin: Keep CSS Imports\r\n\r\n`rollup-plugin-keep-css-imports` is a Rollup plugin that allows to maintain\r\nthe original structure of style imports (CSS, SCSS, or SASS) without altering\r\nthem during the bundling process.\r\n\r\n## Why?\r\n\r\nIt will be helpful for building a components library and want to keep\r\nall CSS module imports untouched so consumer decide how to bundle or tree shake\r\nthem. This plugin support both bundled and preserved modules ESM outputs.\r\n\r\n## Features\r\n\r\n- Keeps style imports unchanged\r\n- Supports CSS, SCSS, and SASS files\r\n- Allows the use of custom output paths and extensions\r\n- Emits assets to the specified output directory\r\n- Supports source maps\r\n- Compatible with PostCSS\r\n\r\nInstallation\r\n\r\nInstall via npm:\r\n\r\n```sh\r\nnpm install rollup-plugin-keep-css-imports --save-dev\r\n```\r\n\r\nor via yarn:\r\n\r\n```sh\r\nyarn add rollup-plugin-keep-css-imports --dev\r\n```\r\n\r\nUsage\r\n\r\nAdd the plugin to Rollup configuration file:\r\n\r\n```js\r\nimport keepCssImports from \"rollup-plugin-keep-css-imports\"\r\n\r\nexport default {\r\n  input: \"src/index.js\",\r\n  output: {\r\n    file: \"dist/bundle.js\",\r\n    format: \"esm\",\r\n  },\r\n  plugins: [\r\n    keepCssImports({\r\n      // Plugin options go here\r\n    }),\r\n  ],\r\n}\r\n```\r\n\r\n## Options\r\n\r\n### outputExt\r\n\r\n|          |          |\r\n| -------- | -------- |\r\n| Type:    | `string` |\r\n| Default: | `\".css\"` |\r\n\r\nSpecifies the file extension for the output CSS files. This is typically \".css\"\r\nbut can be changed if needed.\r\n\r\n### outputDir\r\n\r\n|          |          |\r\n| -------- | -------- |\r\n| Type:    | `string` |\r\n| Default: | `\"./\"`   |\r\n\r\nSpecifies the output directory for the generated CSS files. Relative to Rollup\r\noutput folder.\r\n\r\n### outputPath\r\n\r\n|          |                                    |\r\n| -------- | ---------------------------------- |\r\n| Type:    | `\"keep\"` \\| `string` \\| `function` |\r\n| Default: | `\"keep\"`                           |\r\n\r\nSpecifies the output path relative to `outputDir` for the generated CSS files.\r\nThe default value, \"keep\", preserves the original file paths. It is also\r\npossible to provide a custom function to generate output paths based on the\r\ninput file.\r\n\r\n**Example:**\r\n\r\n```js\r\nimport keepCssImports from \"rollup-plugin-keep-css-imports\"\r\nimport path from \"path\"\r\n\r\nexport default {\r\n  input: \"src/index.js\",\r\n  output: {\r\n    file: \"dist/bundle.js\",\r\n    format: \"esm\",\r\n  },\r\n  plugins: [\r\n    keepCssImports({\r\n      outputPath: (assetId) => {\r\n        // Generate a custom output path based on the input assetId\r\n\r\n        // Make the assetId path relative to the current working directory (CWD)\r\n        const relativePath = path.relative(process.cwd(), assetId)\r\n\r\n        // Replace 'src' with 'styles' in the relativePath\r\n        const newPath = relativePath.replace(\"src\", \"styles\")\r\n\r\n        // Add a '.min' suffix before the file extension,\r\n        // extension will be replaced with `outputExt` by the plugin\r\n        return newPath.replace(/(\\.s[ca]ss)$/, \".min$1\")\r\n      },\r\n    }),\r\n  ],\r\n}\r\n```\r\n\r\n### includePaths\r\n\r\n|          |                     |\r\n| -------- | ------------------- |\r\n| Type:    | `Array<string>`     |\r\n| Default: | `[\"node_modules/\"]` |\r\n\r\nSpecifies the list of include paths for SASS to search when resolving imports.\r\n\r\n### sass\r\n\r\n|          |                 |\r\n| -------- | --------------- |\r\n| Type:    | `Sass compiler` |\r\n| Default: | `Dart Sass`     |\r\n\r\nAn optional object that allows you to provide a custom SASS implementation,\r\nsuch as Dart SASS or Node SASS. If not specified you must install Dart SASS\r\n(`npm install sass --save-dev` / `yarn add sass --dev`)\r\n\r\n### postProcessor\r\n\r\n|          |             |\r\n| -------- | ----------- |\r\n| Type:    | `function`  |\r\n| Default: | `undefined` |\r\n\r\nAn optional function that allows you to perform additional processing on the\r\ngenerated CSS, such as applying PostCSS plugins.\r\n\r\n**Example:**\r\nUse PostCSS with the `postcss-url` plugin to inline the URLs in the CSS files:\r\n\r\n```js\r\nimport keepCssImports from \"rollup-plugin-keep-css-imports\"\r\nimport path from \"path\"\r\nimport postcss from \"postcss\"\r\nimport url from \"postcss-url\"\r\n\r\nexport default {\r\n  input: \"src/index.js\",\r\n  output: {\r\n    file: \"dist/bundle.js\",\r\n    format: \"esm\",\r\n  },\r\n  plugins: [\r\n    keepCssImports({\r\n      postProcessor: () =>\r\n        postcss([\r\n          url({\r\n            url: \"inline\",\r\n            basePath: [path.resolve(\"src\"), path.resolve(\"node_modules\")],\r\n          }),\r\n        ]),\r\n    }),\r\n  ],\r\n}\r\n```\r\n\r\n### sourceMap\r\n\r\n|          |                         |\r\n| -------- | ----------------------- |\r\n| Type:    | `boolean` \\| `\"inline\"` |\r\n| Default: | `false`                 |\r\n\r\nSpecifies whether to generate source maps for the compiled CSS.\r\nUse `\"inline\"` to inline source maps into CSS files.\r\n\r\n### skipCurrentFolderPart\r\n\r\n|          |                         |\r\n| -------- | ----------------------- |\r\n| Type:    | `boolean` \\| `RegExp` |\r\n| Default: | `false`                 |\r\n\r\nBy default CSS paths will be prefixed with current folder mark `./`.\r\nTo not do this with CSS files use `true` or specify RegExp filter.\r\nIf RegExp filter matches `./` won't be added to the path.\r\nThis option may be helpful if you have some issues with external\r\nmodules imports from `node_modules`\r\n\r\n### sassOptions\r\n\r\n|          |             |\r\n| -------- | ----------- |\r\n| Type:    | `Object`    |\r\n| Default: | `undefined` |\r\n\r\nAn optional object that allows to provide additional options for the SASS\r\ncompiler.\r\n\r\n## Notes\r\n\r\n- Plugin reads `preserveModulesRoot` property of Rollup output settings, so it\r\n  can be used to make output tree depth smaller\r\n\r\n## License\r\n\r\n[MIT](./LICENSE)\r\n\r\nCopyright (c) 2023 Alexandr Yeskov\r\n","readmeFilename":"README.md","gitHead":"301c3d3fc38866c599ccb60bd857de4fe2f55f20","_id":"rollup-plugin-keep-css-imports@1.0.0-rc2","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-NbXQPnKOuvxNFzX0iwh0xUAYE+Qbs4Q51296MPZqhs3bwjN/idSogAHzrBvBOwiu/s1Wr0AEjm9fznsrZ6xUxw==","shasum":"71bf452085b54605a73c16cb3a677e5546d0e034","tarball":"https://registry.npmjs.org/rollup-plugin-keep-css-imports/-/rollup-plugin-keep-css-imports-1.0.0-rc2.tgz","fileCount":5,"unpackedSize":31295,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCSFEd3gnObjfQpDJpLfGZYWaSIUGljqFL2MO+PAbpt4wIhAL7BEJgfSvXqXftGK+Fv3MQjHLwwGe6IspkUr1Vn5hRo"}]},"_npmUser":{"name":"sltk","email":"dev@yeskov.com"},"directories":{},"maintainers":[{"name":"sltk","email":"dev@yeskov.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-keep-css-imports_1.0.0-rc2_1705575202490_0.5776432737423953"},"_hasShrinkwrap":false},"1.0.0-rc3":{"name":"rollup-plugin-keep-css-imports","version":"1.0.0-rc3","description":"Rollup plugin that allows to maintain the original structure of style imports without altering them during the bundling process","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}}},"keywords":["rollup","rollup-plugin","css-modules","sass","scss","keep","preserve","imports"],"homepage":"https://github.com/SLTKA/rollup-plugin-keep-css-imports","author":{"name":"Alexandr Yeskov"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/SLTKA/rollup-plugin-keep-css-imports.git"},"bugs":{"url":"https://github.com/SLTKA/rollup-plugin-keep-css-imports/issues"},"scripts":{"prebuild":"rimraf -rf dist/","build":"rollup -c","test":"mocha","pretest":"yarn build"},"devDependencies":{"@rollup/plugin-typescript":"^11.1.6","@types/mocha":"^10.0.6","@types/node":"^20.11.24","eslint":"^8.56.0","eslint-config-prettier":"^9.1.0","eslint-plugin-mocha":"^10.2.0","eslint-plugin-prettier":"^5.1.3","mocha":"^10.2.0","prettier":"^3.2.4","rimraf":"^5.0.5","rollup":"^4.9.5","rollup-plugin-dts":"^6.1.0","sass":"^1.70.0","ts-node":"^10.9.2","typescript":"^5.3.3"},"dependencies":{"magic-string":"^0.30.5"},"gitHead":"cd604765fbd4d601d5828eab82e06df12931a79a","_id":"rollup-plugin-keep-css-imports@1.0.0-rc3","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-0T3nJyfmCM8VYG+TmvUEsh5W8wlmu/t8aY3tIyFn12V7ky9ROXb85z03SXaHssUFcyGcaY0sYWa0DH2+PGSZaA==","shasum":"4794990ab4ea3fd21043b24122c7ea675934e767","tarball":"https://registry.npmjs.org/rollup-plugin-keep-css-imports/-/rollup-plugin-keep-css-imports-1.0.0-rc3.tgz","fileCount":9,"unpackedSize":57850,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF/LYC7/vvnzsUJYBABxy6UpoWAy+hBfWFpmfL8DlkeXAiBsEX7jiXLP5qYPzHNjhwZR3wzqhA9ergSfNY5fy+S4iw=="}]},"_npmUser":{"name":"sltk","email":"dev@yeskov.com"},"directories":{},"maintainers":[{"name":"sltk","email":"dev@yeskov.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-keep-css-imports_1.0.0-rc3_1709634375122_0.7478419953534907"},"_hasShrinkwrap":false},"1.0.0-rc4":{"name":"rollup-plugin-keep-css-imports","version":"1.0.0-rc4","description":"Rollup plugin that allows to maintain the original structure of style imports without altering them during the bundling process","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}}},"keywords":["rollup","rollup-plugin","css-modules","sass","scss","keep","preserve","imports"],"homepage":"https://github.com/SLTKA/rollup-plugin-keep-css-imports","author":{"name":"Alexandr Yeskov"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/SLTKA/rollup-plugin-keep-css-imports.git"},"bugs":{"url":"https://github.com/SLTKA/rollup-plugin-keep-css-imports/issues"},"scripts":{"prebuild":"rimraf -rf dist/","build":"rollup -c","test":"mocha","pretest":"yarn build"},"devDependencies":{"@rollup/plugin-typescript":"^11.1.6","@types/mocha":"^10.0.6","@types/node":"^20.11.24","eslint":"^8.56.0","eslint-config-prettier":"^9.1.0","eslint-plugin-mocha":"^10.2.0","eslint-plugin-prettier":"^5.1.3","mocha":"^10.2.0","prettier":"^3.2.4","rimraf":"^5.0.5","rollup":"^4.9.5","rollup-plugin-dts":"^6.1.0","sass":"^1.70.0","ts-node":"^10.9.2","typescript":"^5.3.3"},"dependencies":{"magic-string":"^0.30.5"},"readme":"# Rollup Plugin: Keep CSS Imports\n\n`rollup-plugin-keep-css-imports` is a Rollup plugin that allows to maintain\nthe original structure of style imports (CSS, SCSS, or SASS) without altering\nthem during the bundling process.\n\n## Why?\n\nIt will be helpful for building a components library and want to keep\nall CSS module imports untouched so consumer decide how to bundle or tree shake\nthem. This plugin support both bundled and preserved modules ESM outputs.\n\n## Features\n\n- Keeps style imports unchanged\n- Supports CSS, SCSS, and SASS files\n- Allows the use of custom output paths and extensions\n- Emits assets to the specified output directory\n- Supports source maps\n- Compatible with PostCSS\n\nInstallation\n\nInstall via npm:\n\n```sh\nnpm install rollup-plugin-keep-css-imports --save-dev\n```\n\nor via yarn:\n\n```sh\nyarn add rollup-plugin-keep-css-imports --dev\n```\n\nUsage\n\nAdd the plugin to Rollup configuration file:\n\n```js\nimport keepCssImports from \"rollup-plugin-keep-css-imports\"\n\nexport default {\n  input: \"src/index.js\",\n  output: {\n    file: \"dist/bundle.js\",\n    format: \"esm\",\n  },\n  plugins: [\n    keepCssImports({\n      // Plugin options go here\n    }),\n  ],\n}\n```\n\n## Options\n\n### outputExt\n\n|          |          |\n| -------- | -------- |\n| Type:    | `string` |\n| Default: | `\".css\"` |\n\nSpecifies the file extension for the output CSS files. This is typically \".css\"\nbut can be changed if needed.\n\n### outputDir\n\n|          |          |\n| -------- | -------- |\n| Type:    | `string` |\n| Default: | `\"./\"`   |\n\nSpecifies the output directory for the generated CSS files. Relative to Rollup\noutput folder.\n\n### outputPath\n\n|          |                                    |\n| -------- | ---------------------------------- |\n| Type:    | `\"keep\"` \\| `string` \\| `function` |\n| Default: | `\"keep\"`                           |\n\nSpecifies the output path relative to `outputDir` for the generated CSS files.\nThe default value, \"keep\", preserves the original file paths. It is also\npossible to provide a custom function to generate output paths based on the\ninput file.\n\n**Example:**\n\n```js\nimport keepCssImports from \"rollup-plugin-keep-css-imports\"\nimport path from \"path\"\n\nexport default {\n  input: \"src/index.js\",\n  output: {\n    file: \"dist/bundle.js\",\n    format: \"esm\",\n  },\n  plugins: [\n    keepCssImports({\n      outputPath: (assetId) => {\n        // Generate a custom output path based on the input assetId\n\n        // Make the assetId path relative to the current working directory (CWD)\n        const relativePath = path.relative(process.cwd(), assetId)\n\n        // Replace 'src' with 'styles' in the relativePath\n        const newPath = relativePath.replace(\"src\", \"styles\")\n\n        // Add a '.min' suffix before the file extension,\n        // extension will be replaced with `outputExt` by the plugin\n        return newPath.replace(/(\\.s[ca]ss)$/, \".min$1\")\n      },\n    }),\n  ],\n}\n```\n\n### includePaths\n\n|          |                     |\n| -------- | ------------------- |\n| Type:    | `Array<string>`     |\n| Default: | `[\"node_modules/\"]` |\n\nSpecifies the list of include paths for SASS to search when resolving imports.\n\n### sass\n\n|          |                 |\n| -------- | --------------- |\n| Type:    | `Sass compiler` |\n| Default: | `Dart Sass`     |\n\nAn optional object that allows you to provide a custom SASS implementation,\nsuch as Dart SASS or Node SASS. If not specified you must install Dart SASS\n(`npm install sass --save-dev` / `yarn add sass --dev`)\n\n### postProcessor\n\n|          |             |\n| -------- | ----------- |\n| Type:    | `function`  |\n| Default: | `undefined` |\n\nAn optional function that allows you to perform additional processing on the\ngenerated CSS, such as applying PostCSS plugins.\n\n**Example:**\nUse PostCSS with the `postcss-url` plugin to inline the URLs in the CSS files:\n\n```js\nimport keepCssImports from \"rollup-plugin-keep-css-imports\"\nimport path from \"path\"\nimport postcss from \"postcss\"\nimport url from \"postcss-url\"\n\nexport default {\n  input: \"src/index.js\",\n  output: {\n    file: \"dist/bundle.js\",\n    format: \"esm\",\n  },\n  plugins: [\n    keepCssImports({\n      postProcessor: () =>\n        postcss([\n          url({\n            url: \"inline\",\n            basePath: [path.resolve(\"src\"), path.resolve(\"node_modules\")],\n          }),\n        ]),\n    }),\n  ],\n}\n```\n\n### sourceMap\n\n|          |                         |\n| -------- | ----------------------- |\n| Type:    | `boolean` \\| `\"inline\"` |\n| Default: | `false`                 |\n\nSpecifies whether to generate source maps for the compiled CSS.\nUse `\"inline\"` to inline source maps into CSS files.\n\n### skipCurrentFolderPart\n\n|          |                         |\n| -------- | ----------------------- |\n| Type:    | `boolean` \\| `RegExp` |\n| Default: | `false`                 |\n\nBy default CSS paths will be prefixed with current folder mark `./`.\nTo not do this with CSS files use `true` or specify RegExp filter.\nIf RegExp filter matches `./` won't be added to the path.\nThis option may be helpful if you have some issues with external\nmodules imports from `node_modules`\n\n### sassOptions\n\n|          |             |\n| -------- | ----------- |\n| Type:    | `Object`    |\n| Default: | `undefined` |\n\nAn optional object that allows to provide additional options for the SASS\ncompiler.\n\n## Notes\n\n- Plugin reads `preserveModulesRoot` property of Rollup output settings, so it\n  can be used to make output tree depth smaller\n\n## License\n\n[MIT](./LICENSE)\n\nCopyright (c) 2024 Alexandr Yeskov\n","readmeFilename":"README.md","gitHead":"cd604765fbd4d601d5828eab82e06df12931a79a","_id":"rollup-plugin-keep-css-imports@1.0.0-rc4","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-6Vqc2Ln3JuO1MxCPeV3zd/ZCgU6uRB0+X80G3/lisyw1quK+bOPCVxBQDlzhxmGM8hZ17KroDDPRiYSCwnkBpg==","shasum":"58a8240846bb897cf25bf99725976ca71a41b192","tarball":"https://registry.npmjs.org/rollup-plugin-keep-css-imports/-/rollup-plugin-keep-css-imports-1.0.0-rc4.tgz","fileCount":9,"unpackedSize":30608,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICgy1toyzIiQH7kBMHF7PFvvwigFwIwDpccIVQzmriucAiEA0bXNgskF0VaCJMrvKwBBnoNZ6Z4JjVu3AK4I7o8QE/w="}]},"_npmUser":{"name":"sltk","email":"dev@yeskov.com"},"directories":{},"maintainers":[{"name":"sltk","email":"dev@yeskov.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-keep-css-imports_1.0.0-rc4_1709636880594_0.8439276950522778"},"_hasShrinkwrap":false},"1.0.0-rc5":{"name":"rollup-plugin-keep-css-imports","version":"1.0.0-rc5","description":"Rollup plugin that allows to maintain the original structure of style imports without altering them during the bundling process","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}}},"keywords":["rollup","rollup-plugin","css-modules","sass","scss","keep","preserve","imports"],"homepage":"https://github.com/SLTKA/rollup-plugin-keep-css-imports","author":{"name":"Alexandr Yeskov"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/SLTKA/rollup-plugin-keep-css-imports.git"},"bugs":{"url":"https://github.com/SLTKA/rollup-plugin-keep-css-imports/issues"},"scripts":{"prebuild":"rimraf -rf dist/","build":"rollup -c","test":"mocha","pretest":"yarn build"},"devDependencies":{"@rollup/plugin-typescript":"^11.1.6","@types/mocha":"^10.0.6","@types/node":"^20.11.24","eslint":"^8.56.0","eslint-config-prettier":"^9.1.0","eslint-plugin-mocha":"^10.2.0","eslint-plugin-prettier":"^5.1.3","mocha":"^10.2.0","prettier":"^3.2.4","rimraf":"^5.0.5","rollup":"^4.9.5","rollup-plugin-dts":"^6.1.0","sass":"^1.70.0","ts-node":"^10.9.2","typescript":"^5.3.3"},"dependencies":{"magic-string":"^0.30.5"},"readme":"# Rollup Plugin: Keep CSS Imports\n\n`rollup-plugin-keep-css-imports` is a Rollup plugin that allows to maintain\nthe original structure of style imports (CSS, SCSS, or SASS) without altering\nthem during the bundling process.\n\n## Why?\n\nIt will be helpful for building a components library and want to keep\nall CSS module imports untouched so consumer decide how to bundle or tree shake\nthem. This plugin support both bundled and preserved modules ESM outputs.\n\n## Features\n\n- Keeps style imports unchanged\n- Supports CSS, SCSS, and SASS files\n- Allows the use of custom output paths and extensions\n- Emits assets to the specified output directory\n- Supports source maps\n- Compatible with PostCSS\n\nInstallation\n\nInstall via npm:\n\n```sh\nnpm install rollup-plugin-keep-css-imports --save-dev\n```\n\nor via yarn:\n\n```sh\nyarn add rollup-plugin-keep-css-imports --dev\n```\n\nUsage\n\nAdd the plugin to Rollup configuration file:\n\n```js\nimport keepCssImports from \"rollup-plugin-keep-css-imports\"\n\nexport default {\n  input: \"src/index.js\",\n  output: {\n    file: \"dist/bundle.js\",\n    format: \"esm\",\n  },\n  plugins: [\n    keepCssImports({\n      // Plugin options go here\n    }),\n  ],\n}\n```\n\n## Options\n\n### outputExt\n\n|          |          |\n| -------- | -------- |\n| Type:    | `string` |\n| Default: | `\".css\"` |\n\nSpecifies the file extension for the output CSS files. This is typically \".css\"\nbut can be changed if needed.\n\n### outputDir\n\n|          |          |\n| -------- | -------- |\n| Type:    | `string` |\n| Default: | `\"./\"`   |\n\nSpecifies the output directory for the generated CSS files. Relative to Rollup\noutput folder.\n\n### outputPath\n\n|          |                                    |\n| -------- | ---------------------------------- |\n| Type:    | `\"keep\"` \\| `string` \\| `function` |\n| Default: | `\"keep\"`                           |\n\nSpecifies the output path relative to `outputDir` for the generated CSS files.\nThe default value, \"keep\", preserves the original file paths. It is also\npossible to provide a custom function to generate output paths based on the\ninput file.\n\n**Example:**\n\n```js\nimport keepCssImports from \"rollup-plugin-keep-css-imports\"\nimport path from \"path\"\n\nexport default {\n  input: \"src/index.js\",\n  output: {\n    file: \"dist/bundle.js\",\n    format: \"esm\",\n  },\n  plugins: [\n    keepCssImports({\n      outputPath: (assetId) => {\n        // Generate a custom output path based on the input assetId\n\n        // Make the assetId path relative to the current working directory (CWD)\n        const relativePath = path.relative(process.cwd(), assetId)\n\n        // Replace 'src' with 'styles' in the relativePath\n        const newPath = relativePath.replace(\"src\", \"styles\")\n\n        // Add a '.min' suffix before the file extension,\n        // extension will be replaced with `outputExt` by the plugin\n        return newPath.replace(/(\\.s[ca]ss)$/, \".min$1\")\n      },\n    }),\n  ],\n}\n```\n\n### includePaths\n\n|          |                     |\n| -------- | ------------------- |\n| Type:    | `Array<string>`     |\n| Default: | `[\"node_modules/\"]` |\n\nSpecifies the list of include paths for SASS to search when resolving imports.\n\n### sass\n\n|          |                 |\n| -------- | --------------- |\n| Type:    | `Sass compiler` |\n| Default: | `Dart Sass`     |\n\nAn optional object that allows you to provide a custom SASS implementation,\nsuch as Dart SASS or Node SASS. If not specified you must install Dart SASS\n(`npm install sass --save-dev` / `yarn add sass --dev`)\n\n### postProcessor\n\n|          |             |\n| -------- | ----------- |\n| Type:    | `function`  |\n| Default: | `undefined` |\n\nAn optional function that allows you to perform additional processing on the\ngenerated CSS, such as applying PostCSS plugins.\n\n**Example:**\nUse PostCSS with the `postcss-url` plugin to inline the URLs in the CSS files:\n\n```js\nimport keepCssImports from \"rollup-plugin-keep-css-imports\"\nimport path from \"path\"\nimport postcss from \"postcss\"\nimport url from \"postcss-url\"\n\nexport default {\n  input: \"src/index.js\",\n  output: {\n    file: \"dist/bundle.js\",\n    format: \"esm\",\n  },\n  plugins: [\n    keepCssImports({\n      postProcessor: () =>\n        postcss([\n          url({\n            url: \"inline\",\n            basePath: [path.resolve(\"src\"), path.resolve(\"node_modules\")],\n          }),\n        ]),\n    }),\n  ],\n}\n```\n\n### sourceMap\n\n|          |                         |\n| -------- | ----------------------- |\n| Type:    | `boolean` \\| `\"inline\"` |\n| Default: | `false`                 |\n\nSpecifies whether to generate source maps for the compiled CSS.\nUse `\"inline\"` to inline source maps into CSS files.\n\n### skipCurrentFolderPart\n\n|          |                         |\n| -------- | ----------------------- |\n| Type:    | `boolean` \\| `RegExp` |\n| Default: | `false`                 |\n\nBy default CSS paths will be prefixed with current folder mark `./`.\nTo not do this with CSS files use `true` or specify RegExp filter.\nIf RegExp filter matches `./` won't be added to the path.\nThis option may be helpful if you have some issues with external\nmodules imports from `node_modules`\n\n### sassOptions\n\n|          |             |\n| -------- | ----------- |\n| Type:    | `Object`    |\n| Default: | `undefined` |\n\nAn optional object that allows to provide additional options for the SASS\ncompiler.\n\n## Notes\n\n- Plugin reads `preserveModulesRoot` property of Rollup output settings, so it\n  can be used to make output tree depth smaller\n\n## License\n\n[MIT](./LICENSE)\n\nCopyright (c) 2024 Alexandr Yeskov\n","readmeFilename":"README.md","gitHead":"cd604765fbd4d601d5828eab82e06df12931a79a","_id":"rollup-plugin-keep-css-imports@1.0.0-rc5","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-EWcAZSzW77ccbOb2hi68heWeEGsUo+GGRBrYLnxrF2RL0wOKgsktconcmeSK8f4GZTme6CY4/xaY13ik6iJeSA==","shasum":"efe66ca87826f030cd3e4fb793f96cba2226bfc7","tarball":"https://registry.npmjs.org/rollup-plugin-keep-css-imports/-/rollup-plugin-keep-css-imports-1.0.0-rc5.tgz","fileCount":9,"unpackedSize":58824,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnWUCqS3xJY64yyo8qD1IbnauYCC1ZgHjxZx8wNzJWFAIgHO1g1eBETIDxESSih+OJtwcXtjIz+tR9BapX5kgC5aw="}]},"_npmUser":{"name":"sltk","email":"dev@yeskov.com"},"directories":{},"maintainers":[{"name":"sltk","email":"dev@yeskov.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-keep-css-imports_1.0.0-rc5_1709637339813_0.9921925915554635"},"_hasShrinkwrap":false},"1.0.0-rc6":{"name":"rollup-plugin-keep-css-imports","version":"1.0.0-rc6","description":"Rollup plugin that allows to maintain the original structure of style imports without altering them during the bundling process","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}}},"keywords":["rollup","rollup-plugin","css-modules","sass","scss","keep","preserve","imports"],"homepage":"https://github.com/SLTKA/rollup-plugin-keep-css-imports","author":{"name":"Alexandr Yeskov"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/SLTKA/rollup-plugin-keep-css-imports.git"},"bugs":{"url":"https://github.com/SLTKA/rollup-plugin-keep-css-imports/issues"},"scripts":{"prebuild":"rimraf -rf dist/","build":"rollup -c","test":"mocha","pretest":"yarn build"},"devDependencies":{"@rollup/plugin-typescript":"^11.1.6","@types/mocha":"^10.0.6","@types/node":"^20.11.24","@typescript-eslint/eslint-plugin":"^7.1.1","@typescript-eslint/parser":"^7.1.1","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-plugin-mocha":"^10.2.0","eslint-plugin-prettier":"^5.1.3","mocha":"^10.2.0","prettier":"^3.2.4","rimraf":"^5.0.5","rollup":"^4.9.5","rollup-plugin-dts":"^6.1.0","sass":"^1.70.0","ts-node":"^10.9.2","typescript":"^5.3.3","typescript-eslint":"^7.1.1"},"dependencies":{"magic-string":"^0.30.5"},"readme":"# Rollup Plugin: Keep CSS Imports\n\n`rollup-plugin-keep-css-imports` is a Rollup plugin that allows to maintain\nthe original structure of style imports (CSS, SCSS, or SASS) without altering\nthem during the bundling process.\n\n## Why?\n\nIt will be helpful for building a components library and want to keep\nall CSS module imports untouched so consumer decide how to bundle or tree shake\nthem. This plugin support both bundled and preserved modules ESM outputs.\n\n## Features\n\n- Keeps style imports unchanged\n- Supports CSS, SCSS, and SASS files\n- Allows the use of custom output paths and extensions\n- Emits assets to the specified output directory\n- Supports source maps\n- Compatible with PostCSS\n\nInstallation\n\nInstall via npm:\n\n```sh\nnpm install rollup-plugin-keep-css-imports --save-dev\n```\n\nor via yarn:\n\n```sh\nyarn add rollup-plugin-keep-css-imports --dev\n```\n\nUsage\n\nAdd the plugin to Rollup configuration file:\n\n```js\nimport keepCssImports from \"rollup-plugin-keep-css-imports\"\n\nexport default {\n  input: \"src/index.js\",\n  output: {\n    file: \"dist/bundle.js\",\n    format: \"esm\",\n  },\n  plugins: [\n    keepCssImports({\n      // Plugin options go here\n    }),\n  ],\n}\n```\n\n## Options\n\n### includeRegexp\n\n|          |                      |\n| -------- | -------------------- |\n| Type:    | `RegExp`             |\n| Default: | `/\\.(?:s[ca]|c)ss$/` |\n\nRegular expression to test if an import should be processed by this plugin\n\n### outputExt\n\n|          |          |\n| -------- | -------- |\n| Type:    | `string` |\n| Default: | `\".css\"` |\n\nSpecifies the file extension for the output CSS files. This is typically \".css\"\nbut can be changed if needed.\n\n### outputDir\n\n|          |          |\n| -------- | -------- |\n| Type:    | `string` |\n| Default: | `\"./\"`   |\n\nSpecifies the output directory for the generated CSS files. Relative to Rollup\noutput folder.\n\n### outputPath\n\n|          |                                    |\n| -------- | ---------------------------------- |\n| Type:    | `\"keep\"` \\| `string` \\| `function` |\n| Default: | `\"keep\"`                           |\n\nSpecifies the output path relative to `outputDir` for the generated CSS files.\nThe default value, \"keep\", preserves the original file paths. It is also\npossible to provide a custom function to generate output paths based on the\ninput file.\n\n**Example:**\n\n```js\nimport keepCssImports from \"rollup-plugin-keep-css-imports\"\nimport path from \"path\"\n\nexport default {\n  input: \"src/index.js\",\n  output: {\n    file: \"dist/bundle.js\",\n    format: \"esm\",\n  },\n  plugins: [\n    keepCssImports({\n      outputPath: (assetId) => {\n        // Generate a custom output path based on the input assetId\n\n        // Make the assetId path relative to the current working directory (CWD)\n        const relativePath = path.relative(process.cwd(), assetId)\n\n        // Replace 'src' with 'styles' in the relativePath\n        const newPath = relativePath.replace(\"src\", \"styles\")\n\n        // Add a '.min' suffix before the file extension,\n        // extension will be replaced with `outputExt` by the plugin\n        return newPath.replace(/(\\.s[ca]ss)$/, \".min$1\")\n      },\n    }),\n  ],\n}\n```\n\n### includePaths\n\n|          |                     |\n| -------- | ------------------- |\n| Type:    | `Array<string>`     |\n| Default: | `[\"node_modules/\"]` |\n\nSpecifies the list of include paths for SASS to search when resolving imports.\n\n### sass\n\n|          |                 |\n| -------- | --------------- |\n| Type:    | `Sass compiler` |\n| Default: | `Dart Sass`     |\n\nAn optional object that allows you to provide a custom SASS implementation,\nsuch as Dart SASS or Node SASS. If not specified you must install Dart SASS\n(`npm install sass --save-dev` / `yarn add sass --dev`)\n\n### sassOptions\n\n|          |             |\n| -------- | ----------- |\n| Type:    | `Object`    |\n| Default: | `undefined` |\n\nAn optional object that allows to provide additional options for the SASS\ncompiler.\n\n### postProcessor\n\n|          |             |\n| -------- | ----------- |\n| Type:    | `function`  |\n| Default: | `undefined` |\n\nAn optional function that allows you to perform additional processing on the\ngenerated CSS, such as applying PostCSS plugins.\n\n**Example:**\nUse PostCSS with the `postcss-url` plugin to inline the URLs in the CSS files:\n\n```js\nimport keepCssImports from \"rollup-plugin-keep-css-imports\"\nimport path from \"path\"\nimport postcss from \"postcss\"\nimport url from \"postcss-url\"\n\nexport default {\n  input: \"src/index.js\",\n  output: {\n    file: \"dist/bundle.js\",\n    format: \"esm\",\n  },\n  plugins: [\n    keepCssImports({\n      postProcessor: () =>\n        postcss([\n          url({\n            url: \"inline\",\n            basePath: [path.resolve(\"src\"), path.resolve(\"node_modules\")],\n          }),\n        ]),\n    }),\n  ],\n}\n```\n\n### sourceMap\n\n|          |                         |\n| -------- | ----------------------- |\n| Type:    | `boolean` \\| `\"inline\"` |\n| Default: | `false`                 |\n\nSpecifies whether to generate source maps for the compiled CSS.\nUse `\"inline\"` to inline source maps into CSS files.\n\n### skipCurrentFolderPart\n\n|          |                         |\n| -------- | ----------------------- |\n| Type:    | `boolean` \\| `RegExp` |\n| Default: | `false`                 |\n\nBy default CSS paths will be prefixed with current folder mark `./`.\nTo avoid this for CSS files use `true` or specify RegExp filter.\nIf RegExp filter matches `./` won't be added to the path.\nThis option may be helpful if you have some issues with external\nmodules imports from `node_modules`\n\n## Notes\n\n- Plugin reads `preserveModulesRoot` property of Rollup output settings, so it\n  can be used to make output tree depth smaller\n\n## License\n\n[MIT](./LICENSE)\n\nCopyright (c) 2024 Alexandr Yeskov\n","readmeFilename":"README.md","gitHead":"cd604765fbd4d601d5828eab82e06df12931a79a","_id":"rollup-plugin-keep-css-imports@1.0.0-rc6","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-bLU660P5TLC7imDW9MILfPP3kI2aGNMg+8oOR+bSkloiJwcIJ5vY5Mi3x+9sXmoGST1bBqVee0I9LvSk++Foaw==","shasum":"f2dc06ab8b9782a012bf4517c59cbefa02f8a0cb","tarball":"https://registry.npmjs.org/rollup-plugin-keep-css-imports/-/rollup-plugin-keep-css-imports-1.0.0-rc6.tgz","fileCount":11,"unpackedSize":66244,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4vyO8y5CwZBii2qSvc7Y3AaZqFkzuUh5FqsFYcctJSAIgEDJVTv5amyYIUU9GB2JlvpewEI6Frz8jHwnDTxtckCk="}]},"_npmUser":{"name":"sltk","email":"dev@yeskov.com"},"directories":{},"maintainers":[{"name":"sltk","email":"dev@yeskov.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-keep-css-imports_1.0.0-rc6_1709985188806_0.06813367093946043"},"_hasShrinkwrap":false},"1.0.0":{"name":"rollup-plugin-keep-css-imports","version":"1.0.0","description":"Rollup plugin that allows to maintain the original structure of style imports without altering them during the bundling process","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}}},"keywords":["rollup","rollup-plugin","css-modules","sass","scss","keep","preserve","imports"],"homepage":"https://github.com/SLTKA/rollup-plugin-keep-css-imports","author":{"name":"Alexandr Yeskov"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/SLTKA/rollup-plugin-keep-css-imports.git"},"bugs":{"url":"https://github.com/SLTKA/rollup-plugin-keep-css-imports/issues"},"scripts":{"prebuild":"rimraf -rf dist/","build":"rollup -c","test":"mocha","pretest":"yarn build"},"devDependencies":{"@rollup/plugin-typescript":"^11.1.6","@types/mocha":"^10.0.6","@types/node":"^20.11.24","@typescript-eslint/eslint-plugin":"^7.1.1","@typescript-eslint/parser":"^7.1.1","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-plugin-mocha":"^10.2.0","eslint-plugin-prettier":"^5.1.3","mocha":"^10.2.0","prettier":"^3.2.4","rimraf":"^5.0.5","rollup":"^4.9.5","rollup-plugin-dts":"^6.1.0","sass":"^1.70.0","ts-node":"^10.9.2","typescript":"^5.3.3","typescript-eslint":"^7.1.1"},"dependencies":{"magic-string":"^0.30.5"},"gitHead":"33b1893cb1fe36842fa9deb7dc22636b077b73f5","_id":"rollup-plugin-keep-css-imports@1.0.0","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-N2xw6o0xFqgu3Ecy6WkhN8HmY75GkTJDzEik6NjzXmPeeqS/OVhlV2hcn5kHPuyn84NfC7p0sY3PLRuZCsPzQw==","shasum":"d1f3826bb8dc12bf6b0d11a0ba86c52d522c215d","tarball":"https://registry.npmjs.org/rollup-plugin-keep-css-imports/-/rollup-plugin-keep-css-imports-1.0.0.tgz","fileCount":11,"unpackedSize":66360,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHKVVB19kfnwlWhBJdfD46kivBizDJld1L2voPY0lphgIhAK0JZF7EdV/PCju7CT4EOLATV1ddJVlbMHN7zLnEPpys"}]},"_npmUser":{"name":"sltk","email":"dev@yeskov.com"},"directories":{},"maintainers":[{"name":"sltk","email":"dev@yeskov.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-keep-css-imports_1.0.0_1710501038525_0.8581832650131767"},"_hasShrinkwrap":false}},"time":{"created":"2023-04-13T15:59:20.937Z","0.0.1":"2023-04-13T15:59:21.068Z","modified":"2024-03-15T11:10:39.099Z","0.0.2":"2023-04-13T16:02:20.863Z","0.0.3":"2023-04-13T16:12:08.257Z","0.0.4":"2023-04-16T14:00:43.000Z","0.0.5":"2023-04-18T01:02:16.198Z","0.0.6":"2023-06-21T11:26:38.560Z","1.0.0-rc1":"2024-01-18T10:30:41.140Z","1.0.0-rc2":"2024-01-18T10:53:22.657Z","1.0.0-rc3":"2024-03-05T10:26:15.258Z","1.0.0-rc4":"2024-03-05T11:08:00.728Z","1.0.0-rc5":"2024-03-05T11:15:39.975Z","1.0.0-rc6":"2024-03-09T11:53:08.976Z","1.0.0":"2024-03-15T11:10:38.669Z"},"maintainers":[{"name":"sltk","email":"dev@yeskov.com"}],"description":"Rollup plugin that allows to maintain the original structure of style imports without altering them during the bundling process","homepage":"https://github.com/SLTKA/rollup-plugin-keep-css-imports","keywords":["rollup","rollup-plugin","css-modules","sass","scss","keep","preserve","imports"],"repository":{"type":"git","url":"git+https://github.com/SLTKA/rollup-plugin-keep-css-imports.git"},"author":{"name":"Alexandr Yeskov"},"bugs":{"url":"https://github.com/SLTKA/rollup-plugin-keep-css-imports/issues"},"license":"MIT","readme":"# Rollup Plugin: Keep CSS Imports\n\n`rollup-plugin-keep-css-imports` is a Rollup plugin that allows to maintain\nthe original structure of style imports (CSS, SCSS, or SASS) without altering\nthem during the bundling process.\n\n## Why?\n\nIt will be helpful for building a components library and want to keep\nall CSS module imports untouched so consumer decide how to bundle or tree shake\nthem. This plugin support both bundled and preserved modules ESM outputs.\n\n## Features\n\n- Keeps style imports unchanged\n- Supports CSS, SCSS, and SASS files\n- Allows the use of custom output paths and extensions\n- Emits assets to the specified output directory\n- Supports source maps\n- Compatible with PostCSS\n\nInstallation\n\nInstall via npm:\n\n```sh\nnpm install rollup-plugin-keep-css-imports --save-dev\n```\n\nor via yarn:\n\n```sh\nyarn add rollup-plugin-keep-css-imports --dev\n```\n\nUsage\n\nAdd the plugin to Rollup configuration file:\n\n```js\nimport keepCssImports from \"rollup-plugin-keep-css-imports\"\n\nexport default {\n  input: \"src/index.js\",\n  output: {\n    file: \"dist/bundle.js\",\n    format: \"esm\",\n  },\n  plugins: [\n    keepCssImports({\n      // Plugin options go here\n    }),\n  ],\n}\n```\n\n## Options\n\n### Input Options\n\n**includeRegexp**\n\n|          |                      |\n| -------- | -------------------- |\n| Type:    | `RegExp`             |\n| Default: | `/\\.(?:s[ca]|c)ss$/` |\n\nRegular expression to test if an import should be processed by this plugin\n\n### OutputOptions\n\n**outputExt**\n\n|          |          |\n| -------- | -------- |\n| Type:    | `string` |\n| Default: | `\".css\"` |\n\nSpecifies the file extension for the output CSS files. This is typically \".css\"\nbut can be changed if needed.\n\n**outputDir**\n\n|          |          |\n| -------- | -------- |\n| Type:    | `string` |\n| Default: | `\"./\"`   |\n\nSpecifies the output directory for the generated CSS files. Relative to Rollup\noutput folder.\n\n**outputPath**\n\n|          |                                    |\n| -------- | ---------------------------------- |\n| Type:    | `\"keep\"` \\| `string` \\| `function` |\n| Default: | `\"keep\"`                           |\n\nSpecifies the output path relative to `outputDir` for the generated CSS files.\nThe default value, \"keep\", preserves the original file paths. It is also\npossible to provide a custom function to generate output paths based on the\ninput file.\n\n**_Example:_**\n\n```js\nimport keepCssImports from \"rollup-plugin-keep-css-imports\"\nimport path from \"path\"\n\nexport default {\n  input: \"src/index.js\",\n  output: {\n    file: \"dist/bundle.js\",\n    format: \"esm\",\n  },\n  plugins: [\n    keepCssImports({\n      outputPath: (assetId) => {\n        // Generate a custom output path based on the input assetId\n\n        // Make the assetId path relative to the current working directory (CWD)\n        const relativePath = path.relative(process.cwd(), assetId)\n\n        // Replace 'src' with 'styles' in the relativePath\n        const newPath = relativePath.replace(\"src\", \"styles\")\n\n        // Add a '.min' suffix before the file extension,\n        // extension will be replaced with `outputExt` by the plugin\n        return newPath.replace(/(\\.s[ca]ss)$/, \".min$1\")\n      },\n    }),\n  ],\n}\n```\n\n**sourceMap**\n\n|          |                         |\n| -------- | ----------------------- |\n| Type:    | `boolean` \\| `\"inline\"` |\n| Default: | `false`                 |\n\nSpecifies whether to generate source maps for the compiled CSS.\nUse `\"inline\"` to inline source maps into CSS files.\n\n**skipCurrentFolderPart**\n\n|          |                         |\n| -------- | ----------------------- |\n| Type:    | `boolean` \\| `RegExp` |\n| Default: | `false`                 |\n\nBy default CSS paths will be prefixed with current folder mark `./`.\nTo avoid this for CSS files use `true` or specify RegExp filter.\nIf RegExp filter matches `./` won't be added to the path.\nThis option may be helpful if you have some issues with external\nmodules imports from `node_modules`\n\n### Extensions' Options\n\n**includePaths**\n\n|          |                     |\n| -------- | ------------------- |\n| Type:    | `Array<string>`     |\n| Default: | `[\"node_modules/\"]` |\n\nSpecifies the list of include paths for SASS to search when resolving imports.\n\n**sass**\n\n|          |                 |\n| -------- | --------------- |\n| Type:    | `Sass compiler` |\n| Default: | `Dart Sass`     |\n\nAn optional object that allows you to provide a custom SASS implementation,\nsuch as Dart SASS or Node SASS. If not specified you must install Dart SASS\n(`npm install sass --save-dev` / `yarn add sass --dev`)\n\n**sassOptions**\n\n|          |             |\n| -------- | ----------- |\n| Type:    | `Object`    |\n| Default: | `undefined` |\n\nAn optional object that allows to provide additional options for the SASS\ncompiler.\n\n**postProcessor**\n\n|          |             |\n| -------- | ----------- |\n| Type:    | `function`  |\n| Default: | `undefined` |\n\nAn optional function that allows you to perform additional processing on the\ngenerated CSS, such as applying PostCSS plugins.\n\n**_Example:_**\nUse PostCSS with the `postcss-url` plugin to inline the URLs in the CSS files:\n\n```js\nimport keepCssImports from \"rollup-plugin-keep-css-imports\"\nimport path from \"path\"\nimport postcss from \"postcss\"\nimport url from \"postcss-url\"\n\nexport default {\n  input: \"src/index.js\",\n  output: {\n    file: \"dist/bundle.js\",\n    format: \"esm\",\n  },\n  plugins: [\n    keepCssImports({\n      postProcessor: () =>\n        postcss([\n          url({\n            url: \"inline\",\n            basePath: [path.resolve(\"src\"), path.resolve(\"node_modules\")],\n          }),\n        ]),\n    }),\n  ],\n}\n```\n\n## Notes\n\n- Plugin reads `preserveModulesRoot` property of Rollup output settings, so it\n  can be used to make output tree depth smaller\n\n## Supported Rollup versions\n\nTested with v3 and v4\n\n## License\n\n[MIT](./LICENSE)\n\nCopyright (c) 2024 Alexandr Yeskov\n","readmeFilename":"README.md"}