Skip to content
Snippets Groups Projects
Select Git revision
  • 0124f049036735e2f08f41f4de83d6ceda058554
  • annotation-on-video default protected
  • demo_ci
  • 3-upstream-01022023
  • master
  • gh3538-captions
  • 16-adapt-for-images-annot
  • 15-api-for-annotations-on-video
  • 15-annotations-on-videos
  • video_for_annotations
  • wip-1-annotations-on-videos
  • 9-videoviewer-tests
  • 9_wip_videotests
  • 6-fix-tests-and-ci
  • _fix_ci
  • wip-webpack-from-git
16 results

setupJest.js

Blame
  • webpack.config.js 1.12 KiB
    const path = require('path');
    const webpack = require('webpack');
    
    module.exports = {
        mode: process.env.WEBPACK_MODE,
        entry: './src/index.js',
        output: {
          filename: 'main.js',
          path: path.resolve(__dirname, 'public/dist'),
          publicPath: '/dist/',
        },
        devServer: {
          hot: true,
          watchFiles: ['src/**/*'],
          client: {
              logging: 'verbose',
              overlay: true,
              progress: true,
              webSocketURL: 'ws://0.0.0.0:' + process.env.DEV_PORT + '/ws'
          },
          static: [
            {
                directory: path.join(__dirname, 'public'),
                watch: true
            },
            {
                directory: path.join(__dirname, process.env.HTTP_FOLDER ? process.env.HTTP_FOLDER : 'www'),
                watch: false,
                publicPath: '/data'
            },
          ],
          port: 9000
        },
        plugins: [
          new webpack.IgnorePlugin({
            /* cf https://gitlab.tetras-libre.fr/iiif/mirador-video-annotation/-/blob/annotation-on-video/webpack.config.js#L42 */
            resourceRegExp: /@blueprintjs\/(core|icons)/, // ignore optional UI framework dependencies
          })
        ]
    };