How to add support for raw-loader in turbo?
Unanswered
Najmus Sakib posted this in #help-forum
I have installed raw-loader and it just working fine with webpack(both dev and build). But when I add --turbo flag to dev command, it cannot load the raw-loader.
Installed the package as devDependency.
Added ts declaration
then import as
It works in webpack but not in turbo
Installed the package as devDependency.
Added ts declaration
declare module '!!raw-loader!*' {
const contents: string;
export = contents;
}then import as
import styles from '!!raw-loader!~/styles/builder.css';It works in webpack but not in turbo
2 Replies
@joulev https://nextjs.org/docs/app/api-reference/next-config-js/turbo#webpack-loaders
doc is not clear, it says raw-loader in supported list, but could not find any doc on that how to confugure in turbo