{"id":21353408,"url":"https://github.com/feathersui/webpack-openfl-loader","last_synced_at":"2025-08-31T12:34:09.469Z","repository":{"id":41118142,"uuid":"508402389","full_name":"feathersui/webpack-openfl-loader","owner":"feathersui","description":"A Webpack loader for OpenFL and Feathers UI projects targeting html5","archived":false,"fork":false,"pushed_at":"2023-01-03T00:29:01.000Z","size":43,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-18T02:43:05.859Z","etag":null,"topics":["feathers-ui","haxe","openfl","openfl-target-html5","webpack","webpack-loader"],"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/feathersui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"joshtynjala","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2022-06-28T17:54:36.000Z","updated_at":"2023-09-14T05:49:57.000Z","dependencies_parsed_at":"2023-02-01T04:31:12.227Z","dependency_job_id":null,"html_url":"https://github.com/feathersui/webpack-openfl-loader","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feathersui%2Fwebpack-openfl-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feathersui%2Fwebpack-openfl-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feathersui%2Fwebpack-openfl-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feathersui%2Fwebpack-openfl-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feathersui","download_url":"https://codeload.github.com/feathersui/webpack-openfl-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225834597,"owners_count":17531532,"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":["feathers-ui","haxe","openfl","openfl-target-html5","webpack","webpack-loader"],"created_at":"2024-11-22T03:17:30.564Z","updated_at":"2024-11-22T03:17:31.169Z","avatar_url":"https://github.com/feathersui.png","language":"JavaScript","funding_links":["https://github.com/sponsors/joshtynjala"],"categories":[],"sub_categories":[],"readme":"# OpenFL Loader for Webpack\n\nA custom loader to build [OpenFL](https://openfl.org) (and [Feathers UI](https://feathersui.com/)) projects with [Webpack](https://webpack.js.org).\n\n## Usage\n\nCreate a new directory for your project.\n\nCreate the necessary files for an OpenFL project, including _project.xml_ inside the project's root directory and your _.hx_ source files. Then, follow the remaining steps to setup Webpack and openfl-loader.\n\nIn a terminal, run the following command in the root of your project to create a _package.json_ file:\n\n```sh\nnpm init -y\n```\n\nThen, run the following command to install the required dependencies:\n\n```sh\nnpm install --save-dev webpack-cli webpack-dev-server openfl-loader\n```\n\nOpen the _package.json_ file, and modify the `scripts` section:\n\n```json\n\"scripts\": {\n  \"start\": \"webpack serve --mode=development\",\n  \"build\": \"webpack --mode=production\"\n}\n```\n\nCreate a _webpack.config.js_ file in the root of your project:\n\n```js\nmodule.exports = {\n  entry: \"./project.xml\",\n  output: {\n    // change xyz to an appropriate name for your project\n    filename: \"xyz.bundle.js\",\n  },\n  module: {\n    rules: [\n      {\n        test: /\\/project\\.xml$/,\n        use: [\n          {\n            loader: \"openfl-loader\",\n          },\n        ],\n      },\n    ],\n  },\n};\n```\n\nCreate a _public/index.html_ file. Look inside _samples/basic_ sample for an example that's easy to copy with minor modifications.\n\nIn particular, you need to change the _basic.bundle.js_ path to the same output file name used in _webpack.config.js_:\n\n```html\n\u003c!--\n  This bundle file name is defined in webpack.config.js\n--\u003e\n\u003cscript src=\"./basic.bundle.js\"\u003e\u003c/script\u003e\n```\n\nAnd you need to change the `lime.embed()` call to pass the same app file name used in _project.xml_.\n\n```js\n/*\n  the first argument passed to lime.embed() is the\n  \u003capp file=\"******\"/\u003e value from project.xml\n*/\nlime.embed(\"WebpackBasicSample\", \"openfl-content\", 0, 0, {\n  parameters: {},\n});\n```\n\nTo start a local development server, run the following command. Then, open _http://localhost:8080/_ in a web browser.\n\n```sh\nnpm start\n```\n\nTo build a production JavaScript bundle, run the following command:\n\n```sh\nnpm run build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeathersui%2Fwebpack-openfl-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeathersui%2Fwebpack-openfl-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeathersui%2Fwebpack-openfl-loader/lists"}