Mirador webpack build fix.

This commit is contained in:
Michael Spalti
2022-04-28 12:38:35 -07:00
parent 7278b1515c
commit d32566beda
2 changed files with 10 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const path = require('path');
module.exports = {
@@ -10,19 +10,16 @@ module.exports = {
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'
resolve: {
fallback: {
url: false
}},
plugins: [new CopyWebpackPlugin({
patterns: [
{from: './src/mirador-viewer/mirador.html', to: './index.html'}
]
})]
};