Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(addInitScript): support cjs modules when passing both path and arg #32240

Merged
merged 1 commit into from
Aug 21, 2024

Commits on Aug 20, 2024

  1. feat(addInitScript): support cjs modules when passing both path and…

    … `arg`
    
    This works with scripts bundled by:
    - `esbuild entrypoint.ts --bundle --format=cjs --outfile=injected.js`
    - webpack with a typical config
      ```js
      module.exports = {
        entry: {
          'injected': './entry.js',
        },
        output: {
          path: require('path').resolve(__dirname),
          filename: '[name].js',
          libraryTarget: 'commonjs2'
        },
      }
      ```
    dgozman committed Aug 20, 2024
    Configuration menu
    Copy the full SHA
    74a0c33 View commit details
    Browse the repository at this point in the history