From ae3c855469d982cfeda97604a78f26523c474db3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Marques?= <92136951+joaolrpm@users.noreply.github.com> Date: Wed, 17 Jan 2024 03:50:18 +0000 Subject: [PATCH] fix: Mark axios as external dependency in rollup config (#61) --- README.md | 10 +++++++++- rollup.config.js | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 10ff770..3c4988b 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,18 @@ Axios transformer/interceptor that converts _snake_case/camelCase_ ### NPM -``` +```bash npm install axios-case-converter ``` +> [!IMPORTANT] +> +> Axios is a peer dependency of axios-case-converter and must be installed separately. +> +> ```bash +> npm install axios +> ``` + ### CDN ```html diff --git a/rollup.config.js b/rollup.config.js index 745e70c..fd55008 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -14,6 +14,9 @@ const config = { indent: !isProd, exports: 'named', file: `dist/axios-case-converter.${isProd ? 'min.js' : 'js'}`, + globals: { + axios: 'axios', + }, }, plugins: [ nodeResolve({ @@ -24,6 +27,7 @@ const config = { }), isProd && terser(), ], + external: ['axios'], }; export default config;