chore: refactor build configuration to support multiple entry points and update package exports accordingly
This commit is contained in:
+15
-3
@@ -6,12 +6,24 @@ export default defineConfig({
|
||||
plugins: [react({ jsxRuntime: "automatic" })],
|
||||
build: {
|
||||
lib: {
|
||||
entry: resolve(__dirname, "src/index.ts"),
|
||||
entry: {
|
||||
index: resolve(__dirname, "src/index.ts"),
|
||||
plugin: resolve(__dirname, "src/plugin.ts"),
|
||||
},
|
||||
name: "CryptoLocker",
|
||||
fileName: "crypto-locker",
|
||||
},
|
||||
rollupOptions: {
|
||||
external: ["react", "react-dom", "react/jsx-runtime", "crypto-js"],
|
||||
external: [
|
||||
"react",
|
||||
"react-dom",
|
||||
"react/jsx-runtime",
|
||||
"crypto-js",
|
||||
"esbuild",
|
||||
"fs/promises",
|
||||
"path",
|
||||
"url",
|
||||
"mime-types"
|
||||
],
|
||||
output: {
|
||||
globals: {
|
||||
react: "React",
|
||||
|
||||
Reference in New Issue
Block a user