{"id":28089308,"url":"https://github.com/kerrishotts/cordova-plugin-webpack-transpiler","last_synced_at":"2026-03-07T01:03:50.175Z","repository":{"id":57209144,"uuid":"81906774","full_name":"kerrishotts/cordova-plugin-webpack-transpiler","owner":"kerrishotts","description":"Transpile and bundle Webpack automagically","archived":false,"fork":false,"pushed_at":"2017-04-19T21:29:29.000Z","size":111,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-21T23:51:58.320Z","etag":null,"topics":["bundling","cordova","hooks","javascript","phonegap","plugin","transpilation","typescript","webpack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kerrishotts.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGES","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-14T04:59:30.000Z","updated_at":"2018-05-28T10:54:30.000Z","dependencies_parsed_at":"2022-08-26T17:41:34.820Z","dependency_job_id":null,"html_url":"https://github.com/kerrishotts/cordova-plugin-webpack-transpiler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kerrishotts/cordova-plugin-webpack-transpiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerrishotts%2Fcordova-plugin-webpack-transpiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerrishotts%2Fcordova-plugin-webpack-transpiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerrishotts%2Fcordova-plugin-webpack-transpiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerrishotts%2Fcordova-plugin-webpack-transpiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kerrishotts","download_url":"https://codeload.github.com/kerrishotts/cordova-plugin-webpack-transpiler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerrishotts%2Fcordova-plugin-webpack-transpiler/sbom","scorecard":{"id":556179,"data":{"date":"2025-08-11","repo":{"name":"github.com/kerrishotts/cordova-plugin-webpack-transpiler","commit":"293ab5593dbe0ca7bfa51de2dd778145f18eec5c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T12:24:09.992Z","repository_id":57209144,"created_at":"2025-08-20T12:24:09.992Z","updated_at":"2025-08-20T12:24:09.992Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30204452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"ssl_error","status_checked_at":"2026-03-06T18:57:34.882Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bundling","cordova","hooks","javascript","phonegap","plugin","transpilation","typescript","webpack"],"created_at":"2025-05-13T12:56:12.604Z","updated_at":"2026-03-07T01:03:50.157Z","avatar_url":"https://github.com/kerrishotts.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Webpack and Transpiler Cordova Plugin\n\nTranspiles your files, converts your SCSS to CSS, and bundles it all with Webpack _automagically_!\n\n\u003e **NOTE:** This is _experimental_! It works on my machine and on Travis-CI \u0026mdash; but it might blow your installation away. Review the contents of the scripts folder **before** installing it \u0026mdash; make sure you trust the code herein!\n\n## Requirements\n\n* Node and npm must be installed and available in the path, and your computer must be able to install packages from npm.\n    * If intending to use the Babel transpiler, you must have node 5+.\n* Cordova or PhoneGap CLI installed\n    * **NOTE**: This plugin will **NOT** work with PhoneGap Build. Sorry. :cry:\n\n## Installation\n\nAdd the plugin to your Cordova project:\n\n```\n$ cordova plugin add --save cordova-plugin-webpack-transpiler\n```\n\nIf you want to control the configuration used, you can pass a variable (available configurations are in [./config](./config)):\n\n```\n$ cordova plugin add cordova-plugin-webpack-transpiler \\\n          --save --variable config=babel|typescript|...\n```\n\n\u003e **Note:** Adding this to your project will call `npm init` to create a `package.json` if it doesn't already exist. You'll almost certainly want to change the generated file.\n\nAfter the plugin is added, you'll have two new configuration files in your project root:\n\n* `webpack.config.js` - the default configuration for webpack\n* `webpack.common.js` - common webpack configuration (extended by webpack.config.js)\n* `tsconfig.json` - the default TypeScript configuration (when using the TypeScript transpiler)\n* `.babelrc` - the default Babel configuration (when using the Babel transpiler)\n\n\u003e **Note:** If these files are already present in your project root, _they will not be modified_. If something isn't working as expected, check these configuration files!\n\n### Changing the Transpiler configuration\n\nYou can not change the transpiler configuration on-the-fly as the appropriate configuration files will not be completely copied (`webpack.config.js` and `webpack.common.js` is shared between transpilers). If you need to change the transpiler, remove the plugin first, remove the left over configuration files and `node_modules`, and then add the plugin back.\n\n### Plugin discovery\n\nIf this plugin is discovered to be missing and added during a `prepare`, `build`, etc. command, the `prepare` phase has already been executed and has incorrect results. Therefore you should ***execute your previous command again*** to ensure correct results.\n\n## Usage\n\nOnce you install the plugin, you should review the `webpack.config.js` and `webpack.common.js` files and the transpiler configuration files both to understand what the scripts will do and to verify that the paths and settings are as you desire. While the configuration will generally work as-is for a simple project, it is impossible to make a one-config-fits-all configuration. Unless otherwise unable, you should make changes in `webpack.config.js` (see `webpack.common.js` for overrideable structures).\n\nSecond, you need to determine your project structure. The plugin automatically recognizes two structures: `sibling` (or, internal) and `external`. The sibling structure expects your ES2015+/TypeScript code to be in a folder that is a sibling of the `www/js` folder (`www/es` for ES2015+, and `www/ts` for TypeScript). The external structure expects your code to be in a folder separate from `www` (by default, `www.src`). In the latter structure, ES2015+ code lives in `www.src/es` and TypeScript code lives in `www.src/ts`.\n\n\u003e **Note**: When using TypeScript, if you have `www.src/ts` (or `www/ts`), that will take precendence over `www.src/es` (or `www/es`). In this case your entry point will assumed to be `www(.src)/ts/index.ts`.\n\nWhen using the external structure, you may desire to copy additional files and folders from `www.src` to `www`. The defaults are displayed below, but you can edit the `webpack.config.js` file to change this.\n\nOnce you've determined which structure you want to use, you'll need to populate it. The plugin is very particular about the names of your app's entry points (see below for defaults). You can change these if you wish by modifying `webpack.config.js`.\n\nSibling     |Configuration |      Entry Point           | Output\n-----------:|-------------:|:---------------------------|:------------------\nTypeScript  | `typescript` | `www/ts/index.ts`          | `www/js/bundle.js`\nES2015      | `typescript` | `www/es/index.js`          | `www/js/bundle.js`\n            | `babel`      | `www/es/index.js`          | `www/js/bundle.js`\nCSS         | either       | `www/css/styles.css`       | `www/css/bundle.css`\nSCSS        | either       | `www/scss/styles.scss`     | `www/css/bundle.css`\n\nExternal    |Configuration |      Entry Point           | Output\n-----------:|-------------:|:---------------------------|:------------------\nTypeScript  | `typescript` | `www.src/ts/index.ts`      | `www/js/bundle.js`\nES2015      | `typescript` | `www.src/es/index.js`      | `www/js/bundle.js`\n            | `babel`      | `www.src/es/index.js`      | `www/js/bundle.js`\nCSS         | either       | `www.src/css/styles.css`   | `www/css/bundle.css`\nSCSS        | either       | `www.src/scss/styles.scss` | `www/css/bundle.css`\nMisc        | either       | `www.src/*.*`              | `www/*.*`\nCSS         | either       | `www.src/css/**/*`         | `www/css/**/*`\nImages      | either       | `www.src/img/**/*`         | `www/img/**/*`\nJavaScript  | either       | `www.src/js/**/*`          | `www/js/**/*`\nLib files   | either       | `www.src/lib/**/*`         | `www/lib/**/*`\nVendor files| either       | `www.src/vendor/**/*`      | `www/vendor/**/*`\n\nInstalling the plugin doesn't actually do anything beyond registering the hooks with Cordova. The plugin only transforms and copies code when you execute any Cordova command that triggers the `prepare` phase. This triggers two hooks: one works before the `prepare` phase and one works after.\n\nThe `before prepare` hook will transpile your code (and copy files when using the external structure). If an error occurs during this process, you'll be notified. If no error occurs, you should see the something that looks like this:\n\n```text\nStarting webpack bundling and transpilation phase...\n(node:46414) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56\nparseQuery() will be replaced with getOptions() in the next major version of loader-utils.\nts-loader: Using typescript@2.2.1 and /.../example-ts-ext/tsconfig.json\n... webpack bundling and typescript transpilation phase complete!\nHash: 76ef6d9645fc284a7a9c\nVersion: webpack 2.2.1\nTime: 1977ms\n         Asset     Size  Chunks             Chunk Names\n  js/bundle.js  22.6 kB       0  [emitted]  main\ncss/bundle.css  14.8 kB       0  [emitted]  main\n    index.html  2.52 kB          [emitted]\n  img/logo.png  21.8 kB          [emitted]\n```\n\nThe output indicates that four assets were generated. (The paths are relative to your `www` folder.) The `bundle.*` files are transformed from your ES2015+/TypeScript or SCSS files. The other files are files that were copied (this example was from an project using the external structure).\n\n\u003e **Note**: If you are using the sibling project structure, an `after prepare` step will execute. This step removes duplicate files in the resulting platform build artifacts so that your original source files aren't needlessly copied to your app bundles.\n\nIf you are using the `sibling` file structure, you'll need to update your `index.html` file to reference `js/bundle.js` and `css/bundle.css` instead of your original entry files. Otherwise, remove the original entry file source \u0026mdash; the plugin will inject all the other dependencies as needed.\n\n### Debug vs Release\n\nThe plugin watches for a `--release` switch on the command line; if it is detected the following occurs:\n\n* Minification is turned on\n* Sourcemaps are turned off\n\nIf you need to change this behavior, you can override it by copying `webpack.config.js` in your project root to `webpack.release.config.js` and making the desired changes.\n\n### Avoiding transformations\n\nIf, for whatever reason, you don't want this plugin to do anything during the `prepare` phase, you can pass the `--notransform` switch. Probably most useful with the `--nobuild` switch.\n\n### Modifying the configuration files\n\nIf you wish to modify `webpack.common.js`, `webpack.config.js`, `webpack.release.config.js`, `.babelrc`, or `tsconfig.json`, you can. The plugin will not attempt to override their contents, and it won't attempt to overwrite the files on a reinstall. If you need to reset these configuration files, delete them and reinstall the plugin.\n\n\u003e **Note**: You should prefer to override settings used by `webpack.common.js` in `webpack.config.js`.\n\n## Removing the plugin\n\nIf you find that you need to remove the plugin, you can remove it via `cordova plugin rm`. However you'll need to clean up the files that this plugin creates if you wish to be rid of all trace. This means removing (unless you have since modified):\n\n* `node_modules`\n* `package.json`\n* `tsconfig.json`\n* `.babelrc`\n* `webpack.common.js`\n* `webpack.config.js`\n* `webpack.release.config.js`\n\n# Examples\n\n                   Project type | Link\n-------------------------------:|:----------------------------------\nTypeScript, Sibling structure   | [./example-ts](./example-ts)\nTypeScript, External structure  | [./example-ts-ext](./example-ts-ext)\nBabel, Sibling structure        | [./example-babel](./example-ts)\nBabel, External structure       | [./example-babel-ext](./example-ts-ext)\n\n\u003e **Note**: the example projects use `../` to install the plugin, not the plugin name. Your projects will use the plugin identifier instead.\n\n# Built-in Webpack Loaders\n\nThe `webpack.config.js` files come with some useful loaders:\n\nfile pattern                  | loader       | example\n-----------------------------:|:------------:|:-----------------------------\n*.json; *.json5               | json5-loader | `import pkg from \"../../package.json\";`\n*.html; *.txt                 | raw-loader   | `import template from \"../templates/list-item.html\";`\n*.png; *.jp(e)g; *.svg        | file-loader  | `import icon from \"../img/icon.svg\";`\n*.eot; *.ttf; *.woff; *.woff2 | file-loader  | `import icon from \"../img/icon.svg\";`\n\u0026mdash;                       | imports-loader |  None; you must specify the rules yourself\n\nIf a file pattern you need to import isn't matched with a loader, you can specify the loader directly:\n\n```javascript\nimport xml from \"raw-loader!../../config.xml\";\n```\n\n# Built-in asset copying\n\nWhen in the \"external\" operating mode, the following assets will be copied from `www.src` to `www`:\n\n```\n*.*\nimg/**/*\ncss/**.*\njs/**.*\nvendor/**.*\nlib/**.*\nhtml/**/*\n```\n\n# Built-in Module Resolution\n\nThe default configurations add the following module resolution paths (relative to project root):\n\n```\n(www|www.src)/(es|ts)/lib\n(www|www.src)/(es|ts)/vendor\n(www|www.src)/lib\n(www|www.src)/vendor\nnode_modules\n```\n\n# Built-in Aliases\n\nThe default configurations add the following aliases, which may be useful in resolving your app's modules:\n\nAlias            | Path\n----------------:|:--------------------------------------\n`$LIB`           | `(www|www.src)/lib`\n`Lib`            | `(www|www.src)/lib`\n`$VENDOR`        | `(www|www.src)/vendor`\n`Vendor`         | `(www|www.src)/vendor`\n`Components`     | `(www|www.src)/(es|ts)/components`\n`Controllers`    | `(www|www.src)/(es|ts)/controllers`\n`Models`         | `(www|www.src)/(es|ts)/models`\n`Pages`          | `(www|www.src)/(es|ts)/pages`\n`Routes`         | `(www|www.src)/(es|ts)/routes`\n`Templates`      | `(www|www.src)/(es|ts)/templates`\n`Utilities`      | `(www|www.src)/(es|ts)/utilities`\n`Views`          | `(www|www.src)/(es|ts)/views`\n\n# Overriding the configuration\n\nPreferably you should make changes to `webpack.config.js` instead of changing `webpack.common.js`. The main reason is that doing so allows you to remove `webpack.common.js` should a new version of the plugin require a fresh version. Plus, unless you're completely changing how the bundling works, you'll end up with a more maintainable configuration.\n\n## webpack.common.js exports\n\nThe following are exported by `webpack.common.js`:\n\n* `config(options)`: returns a webpack configuration based on `options`, as follows:\n    * `src` (optional): Source directory; defaults to `$PROJECT_ROOT/www.src` if present, or `$PROJECT_ROOT/www` otherwise.\n    * `extensions` (optional): Extensions that can be left off in `import` statements. Defaults to:\n\n        ```js\n        [\".js\", \".ts\", \".jsx\", \".es\", // typical JS extensions\n        \".jsm\", \".esm\",               // jsm is node's ES6 module ext\n        \".json\",                      // some modules require json without an extension\n        \".css\", \".scss\",              // CSS \u0026 SASS extensions\n        \"*\"];                         // allow extensions on imports\n        ```\n\n    * `dirs` (required): directory mappings. A default mapping is exported as `defaults.dirs` and looks like follows:\n\n        ```js\n        {\n            css:      \"css\",\n            es:       \"es\",\n            external: \"www.src\",\n            html:     \"html\",\n            img:      \"img\",\n            js:       \"js\",\n            lib:      \"lib\",\n            scss:     \"scss\",\n            ts:       \"ts\",\n            vendor:   \"vendor\",\n            www:      \"www\",\n            aliases: {\n                Lib: \"lib\",\n                Vendor: \"vendor\",\n                Components:  \"$JS/components\",\n                Controllers: \"$JS/controllers\",\n                Models:      \"$JS/models\",\n                Pages:       \"$JS/pages\",\n                Routes:      \"$JS/routes\",\n                Templates:   \"$JS/templates\",\n                Utilities:   \"$JS/util\",\n                Views:       \"$JS/views\",\n            }\n        }\n        ```\n\n        * The `alias` key is used to add additional module resolution aliases.\n        * `$JS/` is used to point at the `dirs.es`/`dirs.ts` path\n    * `sourcePaths` (optional): Provides the names of the source paths that can be transformed. Any missing paths are copied from the default, as follows:\n\n        ```js\n        {\n            src: options.src,\n            es: dirs.es,\n            ts: dirs.ts\n            scss: dirs.scss\n        }\n        ```\n\n    * `outputPaths` (optional): Provides the names of the output paths. Any missing paths are copied from the default, as follows:\n\n        ```js\n        {\n            www: dirs.www,\n            js: dirs.js,\n            css: dirs.css\n        }\n        ```\n\n    * `indexes` (optional): Provides source/destination mapping for varies entry and index files. Extended from the following form (`from` is relative to `sourcePaths.src`, and `to`/`js`/`css` is relative to `outputPaths.www`):\n\n        ```js\n        {\n            css: {from:, to:}\n            scss: {from:, to:},         # used if allowScss is true\n            es: {from:, to:},\n            ts: {from:, to:},\n            vendor: {js:, css:}\n        }\n        ```\n\n    * `outputFile` (optional): Specifies the output filename for the JavaScript bundle. Defaults to `indexes.es.to + \"bundle.js\"` (or `bundle.ts` if using TypeScript).\n    * `vendor` (required): Modules to output as part of the `vendor` chunk. If none, pass `[]`.\n    * `entryFiles` (optional): Specifies the entry files for the app. If not provided, defaults to (substituting `ts` if using TypeScript):\n\n        ```js\n        {\n            app: [\"./\" + indexes.es.from, \"./\" + indexes.(s)css.from],\n            vendor: vendor  // if vendor has length \u003e 0\n        }\n        ```\n\n    * `allowTypeScript` (optional): Indicates if typescript is permitted. This enables extra extensions and configuration for the TypeScript compiler. Defaults to `false`.\n    * `allowScss` (optional): Indicates if Scss is permitted. Defaults to `false`.\n    * `transpiler` (optional): Indicates the webpack loader to use for JavaScript files. If `allowTypeScript` is `true`, defaults to `ts-loader`, otherwise defaults to `babel-loader`.\n    * `assetsToCopyIfExternal` (required): Indicates the assets to copy from `dirs.external` to `dirs.www`. A default list is exported under `defaults.assetsToCopyIfExternal`, and looks like follows:\n\n        ```js\n        [\n            { from: \"*.html\" },\n            { from: dirs.img + \"/**/*\" },\n            { from: dirs.css + \"/**/*\" },\n            { from: dirs.js + \"/**/*\" },\n            { from: dirs.vendor + \"/**/*\" },\n            { from: dirs.lib + \"/**/*\" },\n            { from: dirs.html + \"/**/*\" },\n        ]\n        ```\n\n    * `assetsToCopyIfSibling` (required): Same as `assetsToCopyIfExternal`, but applies if the source directory is the `dirs.www` folder instead of `dirs.external`. The exported default (`defaults.assetsToCopyIfSibling`) is `[]`.\n    * `cssLoaderFallback` (optional): defaults to `style-loader`\n    * `devtool` (optional): defaults to `inline-source-map` (overridden in release mode to `none`)\n* `defaults`: useful defaults, as follows\n    * `dirs`: exports default directory mappings\n    * `vendor`: exports default vendor modules\n    * `assetsToCopyIfExternal`, `assetsToCopyIfSibling`: exports default assets to copy\n    * `transpiler`: exports default transpiler\n\n## Example configuration\n\nThis configuration uses most of the `typescript` configuration defaults, but adds some React modules to the `vendor` option and adds an additional rule using the `imports-loader`:\n\n```javascript\nvar webpackCommonConfig = require(\"./webpack.common.js\");\n\nvar webpackConfig = webpackCommonConfig.config(\n    {\n        allowTypeScript: true,\n        allowScss: true,\n        transpiler: \"ts-loader\",\n        dirs: webpackCommonConfig.defaults.dirs,\n        assetsToCopyIfExternal: webpackCommonConfig.defaults.assetsToCopyIfExternal,\n        assetsToCopyIfInternal: webpackCommonConfig.defaults.assetsToCopyIfInternal,\n        vendor: webpackCommonConfig.defaults.vendor.concat(\"react\", \"react-dom\", \"react-router\")\n    }\n);\n\nwebpackConfig.module.rules.push({ test: /globalize/, loader: \"imports-loader?define=\u003efalse\" });\n\nmodule.exports = webpackConfig;\n```\n\n# License\n\nApache 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkerrishotts%2Fcordova-plugin-webpack-transpiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkerrishotts%2Fcordova-plugin-webpack-transpiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkerrishotts%2Fcordova-plugin-webpack-transpiler/lists"}