Skip to content

Commit

Permalink
feat: axios 封裝
Browse files Browse the repository at this point in the history
  • Loading branch information
ElvisUpUp committed Dec 8, 2019
1 parent 73cbf1f commit d8af856
Show file tree
Hide file tree
Showing 13 changed files with 7,358 additions and 2,957 deletions.
17 changes: 17 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"presets": [
[
"@babel/env",
{
"modules": false,
"targets": {
"browsers": [
"> 1%",
"last 2 versions",
"not ie <= 12"
]
}
}
],
]
}
2 changes: 1 addition & 1 deletion build/rollup.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const config = require('../package.json')

export default {
input: 'src/index.js',
name: 'vue-axios-plugin',
name: 'wp-axios-plugin',
plugins: [
resolve({
jsnext: true,
Expand Down
16 changes: 16 additions & 0 deletions build/rollup.config.browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import base from './rollup.config.base'
import uglify from 'rollup-plugin-uglify'
import { minify } from 'uglify-es'

const config = Object.assign({}, base, {
output: {
file: 'dist/wp-axios-plugin.min.js',
format: 'iife',
name: '$axios'
},
name: 'VueAxiosPlugin'
})

config.plugins.push(uglify.uglify({}, minify))

export default config
2 changes: 1 addition & 1 deletion build/rollup.config.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import base from './rollup.config.base'

const config = Object.assign({}, base, {
output: {
file: 'dist/vue-axios-plugin.esm.js',
file: 'dist/wp-axios-plugin.esm.js',
format: 'es'
}
})
Expand Down
2 changes: 1 addition & 1 deletion build/rollup.config.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import base from './rollup.config.base'
const config = Object.assign({}, base, {
exports: 'vue-axios-plugins',
output: {
file: 'dist/vue-axios-plugin.umd.js',
file: 'dist/wp-axios-plugin.umd.js',
format: 'umd',
name: 'vue-axios-plugins'
}
Expand Down
Loading

0 comments on commit d8af856

Please sign in to comment.