Skip to content

Commit 74720b5

Browse files
committed
feat: webpack export default
1 parent 8474bab commit 74720b5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

webpack.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
55
const isProduction = process.env.NODE_ENV === 'production';
66
const mode = isProduction ? 'production' : 'development';
77

8-
const libraryName = 'js-library-boilerplate';
8+
const libraryName = 'logger';
99

1010
module.exports = {
1111
mode,
@@ -17,10 +17,10 @@ module.exports = {
1717
output: {
1818
path: path.resolve(__dirname, 'dist'),
1919
filename: '[name].js',
20-
library: libraryName,
21-
libraryTarget: 'umd',
20+
library: 'Logger',
21+
libraryExport: 'default',
2222
umdNamedDefine: true,
23-
globalObject: "typeof self !== 'undefined' ? self : this"
23+
globalObject: `(typeof self !== 'undefined' ? self : this)`
2424
},
2525
module: {
2626
rules: [

0 commit comments

Comments
 (0)