Created
May 29, 2019 06:16
-
-
Save giann/e36cfde839fd747ac343f66927fb995e to your computer and use it in GitHub Desktop.
vue.config.js to use Fengari with Vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require("path"); | |
module.exports = { | |
configureWebpack: { | |
module: { | |
rules: [ | |
{ | |
test: /\.lua$/, | |
oneOf: [ | |
// this applies to <template lang="lua"> in Vue components | |
{ | |
resourceQuery: /^\?vue/, | |
loader: "fengari-loader" | |
}, | |
// this applies to lua imports inside JavaScript | |
{ | |
loader: "fengari-loader" | |
} | |
] | |
} | |
] | |
}, | |
resolve: { | |
alias: { | |
"fengari-web": path.resolve("node_modules/fengari-web") | |
} | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment