Skip to content

Commit 024f779

Browse files
committed
version 1.1.1
1 parent 5d3834a commit 024f779

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@idrinth/rollup-plugin-react-modular-css",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "Provides a plugin to split css files out separately.",
55
"main": "src/index.js",
66
"repository": {

src/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
import pluginImpl from './plugin.js';
2-
import load from './load.js';
32

4-
export const plugin = pluginImpl;
5-
export default load;
3+
export default pluginImpl;

src/write-css.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import {
22
writeFileSync,
3-
} from "fs";
3+
} from 'fs';
44
import {
55
createHash,
6-
} from "crypto";
7-
import CleanCSS from "clean-css";
6+
} from 'crypto';
7+
import CleanCSS from 'clean-css';
88

99
const minifier = new CleanCSS();
1010

@@ -14,12 +14,12 @@ export default (id: string, css: string, code: string, match: string[]): string
1414
.update(css,)
1515
.digest('hex',);
1616
const name = id
17-
.replace(/\/[^/]+.[tj]sx?$/u, '',)
17+
.replace(/\/index.[tj]sx?$/u, '',)
1818
.split('/',)
1919
.pop();
2020
writeFileSync(`${process.cwd()}/public/assets/${name}-${hash}.min.css`, minified, 'utf8',);
2121
return code.replace(
2222
match[0],
23-
`import load from '@idrinth/rollup-plugin-react-modular-css';\n(() => load('${hash}', '${name}'))()`,
23+
`import load from '@idrinth/rollup-plugin-react-modular-css/src/load.js';\n(() => load('${hash}', '${name}'))()`,
2424
);
25-
}
25+
}

0 commit comments

Comments
 (0)