{"id":22423399,"url":"https://github.com/prantlf/karma-requirejs-esm-preprocessor","last_synced_at":"2026-04-25T19:31:21.470Z","repository":{"id":57307180,"uuid":"477888658","full_name":"prantlf/karma-requirejs-esm-preprocessor","owner":"prantlf","description":"Karma preprocessor for converting ES modules to AMD in RequireJS projects.","archived":false,"fork":false,"pushed_at":"2023-05-29T18:03:46.000Z","size":332,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T10:43:00.978Z","etag":null,"topics":["amd","es6","esm","karma","karma-plugin","karma-preprocessor","plugin","preprocessor","requirejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prantlf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-04T22:04:07.000Z","updated_at":"2023-03-19T18:46:35.000Z","dependencies_parsed_at":"2024-12-05T18:11:30.555Z","dependency_job_id":"b57392fc-e300-40af-ab33-348ffa774583","html_url":"https://github.com/prantlf/karma-requirejs-esm-preprocessor","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fkarma-requirejs-esm-preprocessor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fkarma-requirejs-esm-preprocessor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fkarma-requirejs-esm-preprocessor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fkarma-requirejs-esm-preprocessor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prantlf","download_url":"https://codeload.github.com/prantlf/karma-requirejs-esm-preprocessor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245791899,"owners_count":20672668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amd","es6","esm","karma","karma-plugin","karma-preprocessor","plugin","preprocessor","requirejs"],"created_at":"2024-12-05T18:11:13.924Z","updated_at":"2026-04-25T19:31:21.465Z","avatar_url":"https://github.com/prantlf.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# karma-requirejs-esm-preprocessor\n\n[Karma] preprocessor for converting ES modules to AMD in [RequireJS] projects. Uses [requirejs-esm-preprocessor].\n\n## Synopsis\n\n```js\nmodule.exports = config =\u003e config.set({\n  preprocessors: {\n    'src/**/*.js': ['requirejs-esm']\n  },\n  requirejsEsmPreprocessor: {\n    isScript: path =\u003e !path.includes('/test/'),\n    sourceMap: true\n  }\n})\n```\n\n## Installation\n\nThis module can be installed in your project using [NPM], [PNPM] or [Yarn]. Make sure, that you use [Node.js] version 14 or newer.\n\n```sh\nnpm i -D karma-requirejs-esm-preprocessor\npnpm i -D karma-requirejs-esm-preprocessor\nyarn add karma-requirejs-esm-preprocessor\n```\n\n## Configuration\n\n```ts\nisScript(path: string): boolean\n```\n\nAllows further filtering the files before passing them to the preprocessor. If the patterns are inconvenient to specify what files should be preprocessed, a simple pattern can be used to capture all files and the final filtering be done by `isScript` returning `true` only for the paths to files which need preprocessing. The default is `undefined` - no extra filtering.\n\n```ts\nuseStrict: boolean\n```\n\nControls inserting `\"use strict\"` expression to the AMD code output. ESM modules are parsed in the strict mode by default, while AMD modules need the `\"use strict\"` statement. You can set this flag to `false` to relax the parse mode of the output AMD modules. The default is `true`.\n\n```ts\nsourceMap: boolean\n```\n\nEnables an inline source map in the preprocessed output to support debugging in the browser. The default is `true`.\n\n```ts\nonBeforeTransform, onAfterTransform, onBeforeUpdate, onAfterUpdate\n```\n\nESM transformation and AMD update callbacks.\n\n## Contributing\n\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Lint and test your code.\n\n## License\n\nCopyright (c) 2022-2025 Ferdinand Prantl\n\nLicensed under the MIT license.\n\n[RequireJS]: http://requirejs.org/\n[Karma]: http://karma-runner.github.io/\n[requirejs-esm-preprocessor]: https://www.npmjs.com/package/requirejs-esm-preprocessor#readme\n[Node.js]: http://nodejs.org/\n[NPM]: https://www.npmjs.com/\n[PNPM]: https://pnpm.io/\n[Yarn]: https://yarnpkg.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprantlf%2Fkarma-requirejs-esm-preprocessor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprantlf%2Fkarma-requirejs-esm-preprocessor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprantlf%2Fkarma-requirejs-esm-preprocessor/lists"}