joy-loader
raw JSON → 0.0.2 verified Fri May 01 auth: no javascript
A webpack loader for the Joy Go-to-JS transpiler, which converts Go code to JavaScript. Version 0.0.2 is an early release with no stable API. The loader integrates joy into webpack builds, but the project is in active development and not production-ready. It facilitates using Go code in webpack bundles, but lacks documentation, tests, and error handling. Compared to other transpilation loaders, it is experimental and niche.
Common errors
error Module not found: Error: Can't resolve 'joy-loader' ↓
cause Loader not installed in project
fix
npm install joy-loader --save-dev
error Error: No matching loader for .go files ↓
cause Webpack config missing rule for .go
fix
Add test: /\.go$/ to module.rules
Warnings
breaking API may change at any time due to pre-1.0 status ↓
fix Pin to exact version and test updates
Install
npm install joy-loader yarn add joy-loader pnpm add joy-loader Imports
- default
import loader from 'joy-loader'
Quickstart
module.exports = {
module: {
rules: [
{
test: /\.go$/,
use: 'joy-loader'
}
]
}
};