@collie-lang/webpack
v1.1.1
Published
Webpack loader for Collie template language
Downloads
186
Maintainers
Readme
@collie-lang/webpack
Webpack loader for Collie template language.
Installation
npm install --save-dev @collie-lang/webpackUsage
In your webpack.config.js:
module.exports = {
module: {
rules: [
{
test: /\.collie$/,
use: '@collie-lang/webpack'
}
]
}
};Next.js
For Next.js projects, use @collie-lang/next instead, which configures this loader automatically.
Advanced Usage
TypeScript-Friendly Config
// webpack.config.ts
import type { Configuration } from "webpack";
const config: Configuration = {
module: {
rules: [
{
test: /\.collie$/,
use: "@collie-lang/webpack"
}
]
}
};
export default config;Loader Options
The loader does not expose custom options. It delegates to @collie-lang/compiler using defaults optimized for React/JSX output.
How It Works
- Webpack resolves a
.collieimport. - The loader reads the source and invokes the Collie compiler (
@collie-lang/compiler). - The compiler emits JSX (no runtime).
- Your existing JSX/TSX pipeline (Babel, SWC, etc.) handles the rest.
Source Maps
Source maps are forwarded automatically so errors map back to the original .collie files during development.
