how to add webpack loader to nuxt 3 project? For example I'm trying to add ejs loader like this (with nuxi type checking)
build: {
extend(config) {
chainWebpack: (config) => {
config.module
.rule("ejs")
.test(/\.ejs$/)
.use()
.loader("ejs-loader")
.set("options", {
esModule: false,
});
};
},
},
Type '{ extend(config: any): void; }' is not assignable to type '{ quiet?: boolean; analyze?: any; profile?: boolean; extractCSS?: boolean; cssSourceMap?: boolean; ssr?: any; parallel?: boolean; cache?: boolean; standalone?: boolean; publicPath?: string; serverURLPolyfill?: string; ... 25 more ...; followSymlinks?: boolean; }'.
Object literal may only specify known properties, and 'extend' does not exist in type '{ quiet?: boolean; analyze?: any; profile?: boolean; extractCSS?: boolean; cssSourceMap?: boolean; ssr?: any; parallel?: boolean; cache?: boolean; standalone?: boolean; publicPath?: string; serverURLPolyfill?: string; ... 25 more ...; followSymlinks?: boolean; }'.ts(2322)
