File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 11const path = require ( 'path' ) ;
22const pkg = require ( './package.json' ) ;
3- const libraryName = pkg . name ;
3+ const library = pkg . name
4+ . split ( '-' )
5+ . map ( ( s ) => s . charAt ( 0 ) . toUpperCase ( ) + s . slice ( 1 ) )
6+ . join ( '' ) ;
47module . exports = ( env ) => {
58 const isProduction = env === 'production' ;
69 return {
710 entry : './src/index.js' ,
811 output : {
912 filename : isProduction ? 'stringToReactComponent.umd.min.js' : 'stringToReactComponent.umd.js' ,
1013 path : path . resolve ( __dirname , 'dist' ) ,
11- library : libraryName ,
14+ library,
1215 libraryTarget : 'umd' ,
1316 publicPath : '/dist/' ,
1417 umdNamedDefine : true ,
@@ -44,6 +47,7 @@ module.exports = (env) => {
4447 amd : 'ReactDOM' ,
4548 root : 'ReactDOM' ,
4649 } ,
50+ '@babel/standalone' : 'Babel' ,
4751 } ,
4852 } ;
4953} ;
You can’t perform that action at this time.
0 commit comments