All Projects → fengari-lua → fengari-loader

fengari-lua / fengari-loader

Licence: MIT license
Webpack loader for fengari

Programming Languages

javascript
184084 projects - #8 most used programming language
lua
6591 projects

Projects that are alternatives of or similar to fengari-loader

Rust Native Wasm Loader
Stars: ✭ 156 (+477.78%)
Mutual labels:  webpack-loader
Exports Loader
Exports Loader
Stars: ✭ 205 (+659.26%)
Mutual labels:  webpack-loader
gzip-loader
[DEPRECATED] gzip loader module for webpack
Stars: ✭ 15 (-44.44%)
Mutual labels:  webpack-loader
Pug As Jsx Loader
Stars: ✭ 168 (+522.22%)
Mutual labels:  webpack-loader
Angular Router Loader
A Webpack loader that enables string-based module loading with the Angular Router
Stars: ✭ 194 (+618.52%)
Mutual labels:  webpack-loader
Frontmatter Markdown Loader
📝 Webpack Loader for: FrontMatter (.md) -> HTML + Attributes (+ React/Vue Component)
Stars: ✭ 228 (+744.44%)
Mutual labels:  webpack-loader
React Webpack4 Cook
💯The most powerful webpack4 tutorial in the universe
Stars: ✭ 152 (+462.96%)
Mutual labels:  webpack-loader
vue-hot-reload-loader
Enable hot module replacement (HMR) on your Vue components
Stars: ✭ 20 (-25.93%)
Mutual labels:  webpack-loader
String Replace Loader
Replace loader for Webpack
Stars: ✭ 205 (+659.26%)
Mutual labels:  webpack-loader
sizeof-loader
Webpack loader that works like url-loader (or file-loader) but with extracted information such as image dimensions and file-size.
Stars: ✭ 20 (-25.93%)
Mutual labels:  webpack-loader
Workerize Loader
🏗️ Automatically move a module into a Web Worker (Webpack loader)
Stars: ✭ 2,135 (+7807.41%)
Mutual labels:  webpack-loader
Polymer Webpack Loader
WebPack Loader for Polymer Web Components
Stars: ✭ 192 (+611.11%)
Mutual labels:  webpack-loader
One Loader
Single-file components for React
Stars: ✭ 233 (+762.96%)
Mutual labels:  webpack-loader
Webpack.js.org
Repository for webpack documentation and more!
Stars: ✭ 2,049 (+7488.89%)
Mutual labels:  webpack-loader
jsx-compress-loader
⚛️JSX optimisation loader to reduce size of React application
Stars: ✭ 40 (+48.15%)
Mutual labels:  webpack-loader
Webfonts Loader
Make an icon font from SVGs!
Stars: ✭ 153 (+466.67%)
Mutual labels:  webpack-loader
Svg Url Loader
A webpack loader which loads SVG file as utf-8 encoded DataUrl string.
Stars: ✭ 217 (+703.7%)
Mutual labels:  webpack-loader
webpack-demos
webpack小练习
Stars: ✭ 17 (-37.04%)
Mutual labels:  webpack-loader
image-minimizer-webpack-plugin
Webpack loader and plugin to compress images using imagemin
Stars: ✭ 180 (+566.67%)
Mutual labels:  webpack-loader
Vue Template Loader
Vue.js 2.0 template loader for webpack
Stars: ✭ 253 (+837.04%)
Mutual labels:  webpack-loader

Build Status npm License: MIT #fengari on libera.chat

Fengari Loader

Fengari is a lua VM written in Javascript. Webpack is a piece of Javascript tooling to compile scripts and other assets together. This repository contains a webpack loader that allows you to require lua scripts when creating your web page/application.

Install

npm install fengari-loader fengari-web webpack webpack-cli --save-dev

fengari-loader requires fengari-web and webpack as peerDependency. Thus you are able to control the versions accurately.

Usage

src/mycode.lua

return {
  42
}

src/index.js

import mycode from './mycode.lua'

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.lua$/,
        use: [
          { loader: "fengari-loader" }
        ]
      }
    ]
  }
}

Options

Name Type Default Description
dependencies {Object|undefined} undefined If undefined, analyse the required lua file for require calls. Otherwise, manually specifies the dependencies as a map from require string to webpack module name
strip {Boolean} false If true, emit stripped lua bytecode instead of source

How does it work?

fengari-loader preloads lua modules into fengari-web's global state.

Additionally, fengari-loader analyses lua code for calls to the lua global require, and adds the require strings as dependencies to the current webpack module.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].