Skip to content
Snippets Groups Projects
Select Git revision
  • bd35cefd2a71b3fdc121d2fa9657a96aeeb74b7d
  • main default protected
  • 24-everything-from-git
  • 45-create-new-poc-deployment-with-docker
  • 44-add-a-cli-tool
  • improve-deployment
  • 31-backend
  • bash-script-bug-fix
  • upgrades_submodules
  • 24-dependencies-build-nested-watch
  • 24-dependencies-build-using-workspaces
  • 24-dependencies-build
  • wip-all-local
  • 10-annotot
  • 3-annotation-plugin-showing-up
15 results

webpack.config.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
          })
        ]
    };