Skip to content

Commit

Permalink
modify library config
Browse files Browse the repository at this point in the history
  • Loading branch information
likuner committed Apr 13, 2022
1 parent 3aa4a08 commit 4fa882b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ module.exports = {
filename: 'index.js',
path: path.resolve(__dirname, 'dist'),
library: {
name: 'LazyImgEntry',
type: 'umd'
},
globalObject: 'globalThis',
clean: true
},
mode: 'production',
Expand All @@ -21,5 +23,10 @@ module.exports = {
rules: [
{ test: /\.tsx?$/, loader: 'ts-loader' }
]
},
optimization: {
splitChunks: {
chunks: 'all'
}
}
}

0 comments on commit 4fa882b

Please sign in to comment.