diff options
author | Matthew Miller <matthew@millerti.me> | 2020-05-21 01:06:53 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2020-05-21 01:06:53 -0700 |
commit | 67b2e557fdcc570bc598d5ba2242557032c48062 (patch) | |
tree | 735337c9e99ef2d91f68c6331a8ff6581c3a02dd /packages/browser/webpack.config.js | |
parent | 3951be48ae68b4a9184c516680efdbf06633846b (diff) |
Use Webpack to build browser
Diffstat (limited to 'packages/browser/webpack.config.js')
-rw-r--r-- | packages/browser/webpack.config.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/packages/browser/webpack.config.js b/packages/browser/webpack.config.js new file mode 100644 index 0000000..f1b5246 --- /dev/null +++ b/packages/browser/webpack.config.js @@ -0,0 +1,27 @@ +const path = require('path'); + +const outputPath = path.resolve(__dirname, 'dist'); + +module.exports = { + entry: './src/index.ts', + mode: 'production', + devtool: 'source-map', + module: { + rules: [ + { + test: /.ts$/, + use: 'ts-loader', + exclude: /node_modules/, + } + ], + }, + resolve: { + extensions: ['.ts', '.js'], + }, + output: { + path: outputPath, + filename: 'webauthntine-browser.min.js', + library: 'WebAuthntineBrowser', + libraryTarget: 'umd', + }, +}; |