https://github.com/tidev/alloy-loader
Webpack loader for Alloy components
https://github.com/tidev/alloy-loader
npm-package
Last synced: about 1 month ago
JSON representation
Webpack loader for Alloy components
- Host: GitHub
- URL: https://github.com/tidev/alloy-loader
- Owner: tidev
- License: apache-2.0
- Created: 2019-11-14T16:46:26.000Z (over 5 years ago)
- Default Branch: develop
- Last Pushed: 2024-03-06T21:47:01.000Z (over 1 year ago)
- Last Synced: 2025-04-13T20:24:37.164Z (2 months ago)
- Topics: npm-package
- Language: JavaScript
- Homepage:
- Size: 732 KB
- Stars: 2
- Watchers: 14
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# alloy-loader
Webpack loader for [Alloy](https://github.com/appcelerator/alloy) components.
> ⚠️ Note: This loader is meant to be used exclusively in projects powered by [appcd-plugin-webpack](https://github.com/appcelerator/appcd-plugin-webpack) and does not consider external usages.
Instead of using this loader directly you probably want to install [@titanium-sdk/webpack-plugin-alloy](https://github.com/appcelerator/webpack-plugin-alloy#readme), which will automatically configure this loader and everything else required to enable Webpack in your Alloy project.
## Installation
```sh
npm i alloy-loader
```## Options
- `compiler`
- Type: `AlloyCompiler`Alloy [compiler](https://github.com/appcelerator/alloy-devkit/tree/master/packages/alloy-compiler#readme) used to compile controller/view/style files of alloy components.
## Development
Make sure to prune to production dependencies when you link this package, for example to test it in [`@titanium-sdk/webpack-plugin-alloy`](https://github.com/appcelerator/webpack-plugin-alloy). The plugin contained in this loader will create instances of [`ContextElementDependency`](https://github.com/webpack/webpack/blob/master/lib/dependencies/ContextElementDependency.js) and adds them to the Webpack compilation. It is important that these are required from the same Webpack module that actually runs the compilation, or else you'll see cryptic errors about callbacks that were called twice.