File tree Expand file tree Collapse file tree 3 files changed +28
-3
lines changed Expand file tree Collapse file tree 3 files changed +28
-3
lines changed Original file line number Diff line number Diff line change 2
2
// require("babel-polyfill")
3
3
4
4
var $ = require ( 'jquery' ) ;
5
+ //if use in react , you can use require('ali-oss/dist/aliyun-oss-sdk.js'), or see webpack.prod.js
5
6
var OSS = require ( 'ali-oss' ) ;
6
7
var appServer = '/sts' ;
7
8
var bucket = '<bucket-name>' ;
Original file line number Diff line number Diff line change
1
+ var path = require ( 'path' ) ;
2
+
3
+ module . exports = {
4
+ target : 'web' ,
5
+ entry : path . resolve ( __dirname + "/index.js" ) ,
6
+ output : {
7
+ path : path . resolve ( __dirname + "/public" ) ,
8
+ filename : "index.js"
9
+ } ,
10
+ module : {
11
+ rules : [
12
+ {
13
+ test : / \. j s $ / ,
14
+ exclude : / ( n o d e _ m o d u l e s | b o w e r _ c o m p o n e n t s ) / ,
15
+ use : {
16
+ loader : 'babel-loader' ,
17
+ options : {
18
+ presets : [ "babel-preset-es2015" , { modules : false } ] //fix uglifyjs not support es6
19
+ }
20
+ }
21
+ }
22
+ ]
23
+ } ,
24
+ } ;
Original file line number Diff line number Diff line change 86
86
"thunk-mocha" : " ^1.0.3" ,
87
87
"timemachine" : " ^0.3.0" ,
88
88
"uglify-js" : " ^2.8.29" ,
89
- "watchify" : " ^3.9.0" ,
90
- "stream-http" : " ^2.8.0"
89
+ "watchify" : " ^3.9.0"
91
90
},
92
91
"dependencies" : {
93
92
"address" : " ^1.0.0" ,
112
111
"sdk-base" : " ^2.0.1" ,
113
112
"urllib" : " ^2.17.1" ,
114
113
"utility" : " ^1.8.0" ,
115
- "xml2js" : " ^0.4.16"
114
+ "xml2js" : " ^0.4.16" ,
115
+ "stream-http" : " ^2.8.0"
116
116
}
117
117
}
You can’t perform that action at this time.
0 commit comments