- Plugin to add supports for custom languages like Pug, Stylus in vue-native component.
yarn add vue-native-custom-transformer-plugin- Open
vueTransformerPlugin.jsand replace'vue-native-scripts'to'vue-native-custom-transformer-plugin'. - Add custom language packages you want to use. (ex.
yarn add pug typescript stylus) - Add config file named
vue-native-custom-transformer.config.jsto your project root.
- vue-native-example-app
- Example app with Pug / TypeScript / Stylus
- This is an experimental product.
- Do not use this package in production.
- This plugin transpiles each files. (importing another file may causes something odd.)
- Pug (alpha)
- TypeScript (alpha)
- Stylus (alpha)
- I've not tested if this coffee example works.
const CoffeeScript = require('coffeescript')
module.exports = {
// configure transformer plugins
plugins: {
template: ['pug'],
script: [
'ts',
{
lang: 'coffee', // This must be set in "lang" attribute.
transform(content) {
return CoffeeScript.compile(content);
},
},
],
},
};MIT
- This project is based on