Skip to content

Commit

Permalink
build: output the result of the build
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangkaiqiang committed Nov 26, 2018
1 parent 5e78ea8 commit 51d3a58
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "fetch-s",
"version": "1.1.2",
"description": "Fetch-based HTTP requests",
"main": "index.js",
"main": "dist/fetchs.min.js",
"scripts": {
"build": "webpack",
"test": "karma start test/karma.conf.js",
Expand Down
16 changes: 7 additions & 9 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,19 @@ const CleanWebpackPlugin = require('clean-webpack-plugin'); //每次构建清理
module.exports = {
entry: './index.js',
output: {
filename: 'fetch-s.min.js',
filename: 'fetchs.min.js',
library: 'fetchs',
libraryTarget: 'umd',
path: path.resolve(__dirname, 'dist')
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader'
}
rules: [{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader'
}
]
}]
},
plugins: [
new CleanWebpackPlugin(['dist']),
Expand Down

0 comments on commit 51d3a58

Please sign in to comment.