More specifically I'm trying to use the slim-lang-loader
From the examples, I found I see that it's possible to change configurations on existing loaders, but haven't yet understood how to add a new loader.
Thanks!
Looking at https://github.com/developit/preact-cli/blob/master/src/lib/webpack/webpack-base-config.js
and doing:
// preact.config.js
const webpack = require('webpack');
import HtmlWebpackSlimPlugin from 'html-webpack-slim-plugin';
export default function (config, env, helpers) {
config.module.loaders.push({test: /\.slim$/, loader: ['slim-lang-loader']});
config.resolve.extensions.push(".slim");
}
did it
Might be good to add a section to the wiki addressing this.
Looking at https://github.com/developit/preact-cli/blob/master/src/lib/webpack/webpack-base-config.js
and doing:
// preact.config.js const webpack = require('webpack'); import HtmlWebpackSlimPlugin from 'html-webpack-slim-plugin'; export default function (config, env, helpers) { config.module.loaders.push({test: /\.slim$/, loader: ['slim-lang-loader']}); config.resolve.extensions.push(".slim"); }did it
This link is dead now.
I think this is the new link:
https://github.com/preactjs/preact-cli/blob/master/packages/cli/lib/lib/webpack/webpack-base-config.js
Most helpful comment
Might be good to add a section to the wiki addressing this.