Skip to content

Commit 7aa88e8

Browse files
build: move code to index.js
1 parent 0a72ecd commit 7aa88e8

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"engines": {
2525
"node": ">=12.22"
2626
},
27-
"main": "dist/AsyncCssPlugin.js",
27+
"main": "dist/index.js",
2828
"files": [
2929
"/dist/",
3030
"!/**/*.map",

src/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// https://github.com/andreashuber69/async-css-plugin/blob/develop/README.md#----async-css-plugin
2+
3+
// eslint-disable-next-line import/no-default-export
4+
export { default } from "./AsyncCssPlugin.ts";
5+
6+
export type * from "./Options.ts";

vite.config.mts

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,13 @@ import dts from "vite-plugin-dts";
77
export default defineConfig({
88
build: {
99
lib: {
10-
entry: ["src/AsyncCssPlugin.ts"],
11-
fileName: "AsyncCssPlugin",
10+
entry: ["src/index.ts"],
11+
fileName: "index",
1212
formats: ["cjs"],
1313
},
1414
outDir: "dist",
15-
rollupOptions: {
16-
input: {
17-
AsyncCssPlugin: "src/AsyncCssPlugin.ts",
18-
},
19-
},
2015
sourcemap: true,
2116
ssr: true,
2217
},
23-
plugins: [
24-
dts({
25-
rollupTypes: true,
26-
tsconfigPath: "tsconfig.json",
27-
}),
28-
],
18+
plugins: [dts({ rollupTypes: true })],
2919
});

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy