From 07764c44aac32f23d2b348af4507a96970b6ac3c Mon Sep 17 00:00:00 2001 From: jero Date: Mon, 28 Oct 2019 12:20:02 +0300 Subject: [PATCH] fix(rollup): use lowercase for file name use "uselazy" for main, unpkg and module properties on package.json --- package.json | 6 +++--- rollup.config.js | 12 ++++++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 72248f2..bd4b589 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,9 @@ "lazy hook", "react lazy hook" ], - "main": "dist/useLazy.js", - "unpkg": "dist/useLazy.js", - "module": "es/useLazy.js", + "main": "dist/uselazy.js", + "unpkg": "dist/uselazy.js", + "module": "es/uselazy.js", "files": [ "dist", "lib", diff --git a/rollup.config.js b/rollup.config.js index 63f5e7c..feb3322 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -14,7 +14,11 @@ export default [ // ES { input: 'src/index.tsx', - output: { file: 'es/useLazy.js', format: 'es', indent: false }, + output: { + file: 'es/uselazy.js', + format: 'es', + indent: false + }, external, plugins: [ commonjs({ @@ -31,7 +35,7 @@ export default [ // ES for Browsers { input: 'src/index.tsx', - output: { file: 'es/useLazy.mjs', format: 'es', indent: false }, + output: { file: 'es/uselazy.mjs', format: 'es', indent: false }, external, plugins: [ commonjs({ @@ -60,7 +64,7 @@ export default [ { input: 'src/index.tsx', output: { - file: 'dist/useLazy.js', + file: 'dist/uselazy.js', format: 'umd', name: 'useLazy', indent: false, @@ -89,7 +93,7 @@ export default [ { input: 'src/index.tsx', output: { - file: 'dist/useLazy.min.js', + file: 'dist/uselazy.min.js', format: 'umd', name: 'useLazy', indent: false,