9.0.1 • Published 2 years ago
@riotjs/webpack-loader v9.0.1
Riot.js webpack-loader
Riot.js official webpack loader
Important
If you are using Riot.js < 4.0.0 please check the v3 branch
Installation
npm i @riotjs/webpack-loader @riotjs/compiler -DUsage
Add the @riotjs/webpack-loader in your webpack.config.js file
module.exports = {
module: {
rules: [
{
test: /\.riot$/,
exclude: /node_modules/,
use: [
{
loader: '@riotjs/webpack-loader',
options: {
hot: false, // set it to true if you are using hmr
// add here all the other @riotjs/compiler options riot.js.org/compiler
// template: 'pug' for example
},
},
],
},
],
},
}If you want to enable hmr via hot option you will need to install also @riotjs/hot-reload
npm i @riotjs/hot-reload -DAnd afterward webpack will be able to automatically reload your Riot.js components in runtime.
Examples
Please check this simple example to see how it's easy to configure webpack with riot
9.0.1
2 years ago
9.0.0
2 years ago
6.0.0
4 years ago
5.0.0
5 years ago
4.0.3
6 years ago
4.0.2
6 years ago
4.0.1
6 years ago
4.0.0
7 years ago
4.0.0-alpha.4
7 years ago
4.0.0-alpha.3
7 years ago
4.0.0-alpha.2
7 years ago
4.0.0-alpha.1
7 years ago