Skip to content

Commit ebc6146

Browse files
authored
Update plugin.ts (#4)
* Update plugin.ts * Update write-css.ts * Update README.md
1 parent 86725f9 commit ebc6146

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# Rolluo-Plugin: modular CSS
1+
# Rollup-Plugin: Modular CSS
22

33
This plugin extracts modular css files instead of creating one big file.

src/plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import writeCss from './write-css.js';
1111

1212
export default function () {
1313
return {
14-
name: '@idrinth/rollup-plugin-react-modular-css',
14+
name: '@idrinth-api-bench/rollup-plugin-react-modular-css',
1515
transform ( code: string, id: string ) {
1616
const csss = [];
1717
const css = code.matchAll(/import ["']\.\/[^"]+?\.css['"];/ug);
@@ -41,4 +41,4 @@ export default function () {
4141
return null;
4242
}
4343
};
44-
}
44+
}

src/write-css.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ export default (id: string, css: string, code: string): string => {
1919
.split('/',)
2020
.pop();
2121
writeFileSync(`${process.cwd()}/public/assets/${name}-${hash}.min.css`, minified, 'utf8',);
22-
return `import load from '@idrinth/rollup-plugin-react-modular-css/src/load.js';\n(() => load('${hash}', '${name}'))()\n${code}`;
22+
return `import load from '@idrinth-api-bench/rollup-plugin-react-modular-css/src/load.js';\n(() => load('${hash}', '${name}'))()\n${code}`;
2323
}

0 commit comments

Comments
 (0)