From c02983c88925269d9caebc817243b6902db03e72 Mon Sep 17 00:00:00 2001 From: Michael Spalti Date: Sat, 27 Mar 2021 10:01:50 -0700 Subject: [PATCH] Added webpack configuration for mirador. --- webpack/webpack.mirador.config.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 webpack/webpack.mirador.config.ts diff --git a/webpack/webpack.mirador.config.ts b/webpack/webpack.mirador.config.ts new file mode 100644 index 0000000000..3e04ad6b79 --- /dev/null +++ b/webpack/webpack.mirador.config.ts @@ -0,0 +1,28 @@ +const HtmlWebpackPlugin = require('html-webpack-plugin'); +const path = require('path'); + +module.exports = { + mode: 'production', + entry: { + mirador: './src/mirador-viewer/index.js' + }, + output: { + path: path.resolve(__dirname, '..' , 'dist/iiif/mirador'), + filename: '[name].js' + }, + module: { + rules: [ + { + test: /\.html$/i, + loader: 'html-loader', + }, + ], + }, + devServer: { + contentBase: '../dist/iiif/mirador', + }, + plugins: [new HtmlWebpackPlugin({ + filename: 'index.html', + template: './src/mirador-viewer/mirador.html' + })] +};