File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+ const webpack = require ( 'webpack' ) ;
4+ const path = require ( 'path' ) ;
5+
6+ module . exports = {
7+ entry : './src/react-aplayer.js' ,
8+ output : {
9+ path : path . resolve ( __dirname , './dist' ) ,
10+ filename : 'react-aplayer.min.js' ,
11+ libraryTarget : 'umd'
12+ } ,
13+ externals : [ 'react' ] ,
14+ module : {
15+ rules : [
16+ {
17+ test : / ( \. j s ) | ( \. j s x ) $ / ,
18+ 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 ) / ,
19+ use : {
20+ loader : 'babel-loader' ,
21+ options : {
22+ presets : [ 'es2015' , 'react' ]
23+ }
24+ }
25+ }
26+ ]
27+ } ,
28+ plugins : [
29+ new webpack . LoaderOptionsPlugin ( {
30+ debug : false
31+ } ) ,
32+ new webpack . optimize . UglifyJsPlugin ( {
33+ compress : {
34+ warnings : false ,
35+ comparisons : false ,
36+ } ,
37+ output : {
38+ comments : false ,
39+ } ,
40+ sourceMap : true ,
41+ } ) ]
42+ } ;
You can’t perform that action at this time.
0 commit comments