Skip to content
Snippets Groups Projects
Select Git revision
  • 2024ws
  • 2023ws protected
2 results

termine.txt

Blame
  • esbuild.mjs 592 B
    import * as esbuild from 'esbuild';
    
    // Fetch 'RELATIVE_URL_ROOT' ENV variable value while removing any trailing slashes.
    const relativeUrlRoot = (process.env.RELATIVE_URL_ROOT || '').replace(/\/*$/, '');
    
    await esbuild.build({
      entryPoints: ['app/javascript/main.jsx'],
      bundle: true,
      minify: true,
      outdir: 'app/assets/builds',
      loader: {
        '.png': 'dataurl',
        '.svg': 'text',
      },
      define: {
        'process.env.RELATIVE_URL_ROOT': `"${relativeUrlRoot}"`,
        'process.env.OMNIAUTH_PATH': `"${relativeUrlRoot}/auth/openid_connect"`,
      },
    });
    
    console.log('watch build finished');