Skip to content

Commit

Permalink
fix: Mark axios as external dependency in rollup config (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
joaolrpm authored Jan 17, 2024
1 parent cdd9a02 commit ae3c855
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ const config = {
indent: !isProd,
exports: 'named',
file: `dist/axios-case-converter.${isProd ? 'min.js' : 'js'}`,
globals: {
axios: 'axios',
},
},
plugins: [
nodeResolve({
Expand All @@ -24,6 +27,7 @@ const config = {
}),
isProd && terser(),
],
external: ['axios'],
};

export default config;

0 comments on commit ae3c855

Please sign in to comment.