mirror of
https://github.com/arthurfiorette/axios-cache-interceptor.git
synced 2025-12-08 17:36:16 +00:00
build: add umd/index.js for es2017+
This commit is contained in:
parent
1ccfad3c80
commit
7f3a1538e3
@ -9,15 +9,14 @@ const root = (...p) => path.resolve(__dirname, '..', ...p);
|
||||
/**
|
||||
* @param {{
|
||||
* output: string;
|
||||
* entry: string;
|
||||
* esTarget: string;
|
||||
* }} options
|
||||
* @returns {import('webpack').Configuration}
|
||||
*/
|
||||
const config = ({ output, esTarget, entry }) => ({
|
||||
const config = ({ output, esTarget }) => ({
|
||||
mode: 'production',
|
||||
|
||||
entry: root('src', entry),
|
||||
entry: root('src', 'index.ts'),
|
||||
|
||||
output: {
|
||||
path: root(),
|
||||
@ -64,12 +63,14 @@ const config = ({ output, esTarget, entry }) => ({
|
||||
module.exports = [
|
||||
config({
|
||||
esTarget: 'es2015', //es6
|
||||
entry: 'index.ts',
|
||||
output: 'umd/es6.min'
|
||||
}),
|
||||
config({
|
||||
esTarget: 'es5',
|
||||
entry: 'index.ts',
|
||||
output: 'umd/es5.min'
|
||||
}),
|
||||
config({
|
||||
esTarget: 'es2017',
|
||||
output: 'umd/index'
|
||||
})
|
||||
];
|
||||
|
||||
@ -19,6 +19,7 @@ CommonsJS, ESM and more)
|
||||
|
||||
- `axios-cache-interceptor/umd/es6.min.js`: Production file for ES6+
|
||||
- `axios-cache-interceptor/umd/es5.min.js`: Production file for ES5+
|
||||
- `axios-cache-interceptor/umd/index.js`: Production file for ES2017+
|
||||
|
||||
```html
|
||||
<!-- You can use the cdn of your choice -->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user