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' + })] +};