summaryrefslogtreecommitdiffhomepage
path: root/packages/browser/webpack.config.js
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2020-05-21 01:06:53 -0700
committerMatthew Miller <matthew@millerti.me>2020-05-21 01:06:53 -0700
commit67b2e557fdcc570bc598d5ba2242557032c48062 (patch)
tree735337c9e99ef2d91f68c6331a8ff6581c3a02dd /packages/browser/webpack.config.js
parent3951be48ae68b4a9184c516680efdbf06633846b (diff)
Use Webpack to build browser
Diffstat (limited to 'packages/browser/webpack.config.js')
-rw-r--r--packages/browser/webpack.config.js27
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',
+ },
+};