We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d89aa89 commit 5ffe30aCopy full SHA for 5ffe30a
1 file changed
webpack.config.js
@@ -1,14 +1,17 @@
1
const path = require('path');
2
const pkg = require('./package.json');
3
-const libraryName = pkg.name;
+const library = pkg.name
4
+ .split('-')
5
+ .map((s) => s.charAt(0).toUpperCase() + s.slice(1))
6
+ .join('');
7
module.exports = (env) => {
8
const isProduction = env === 'production';
9
return {
10
entry: './src/index.js',
11
output: {
12
filename: isProduction ? 'stringToReactComponent.umd.min.js' : 'stringToReactComponent.umd.js',
13
path: path.resolve(__dirname, 'dist'),
- library: libraryName,
14
+ library,
15
libraryTarget: 'umd',
16
publicPath: '/dist/',
17
umdNamedDefine: true,
@@ -44,6 +47,7 @@ module.exports = (env) => {
44
47
amd: 'ReactDOM',
45
48
root: 'ReactDOM',
46
49
},
50
+ '@babel/standalone': 'Babel',
51
52
};
53
0 commit comments