Closed code4cake closed 6 years ago
Somehow something wants to load .css. For that you need to either setup a css-loader, or configure your bulma.sass file to only import .sass files 😄
@stipsan This is what I have now, am I missing something?
#next.config.js
const path = require("path");
const glob = require("glob");
module.exports = {
webpack: (config, { dev }) => {
config.module.rules.push(
{
// test: /\.(sass|scss)$/,
test: /\.(sass|scss)$/,
loaders: [ 'style-loader', 'css-loader?modules&importLoaders=2', 'sass-loader', 'bulma?theme=sass/bulma.sass'
// { loader: 'css-loader', options: { importLoaders: 1 } }
]
}
)
return config;
}
}
# ./sass/bulma.sass // => empty file
# ./sections/styles.scss
But still getting the
Error in !!../node_modules/css-loader/index.js?modules&importLoaders=2!../node_modules/sass-loader/lib/loader.js!../node_modules/bulma/bulma.sass?theme=sass/bulma.sass!./styles.scss
Module build failed: Error: Cannot find module 'node-sass'
hey guys I'm trying to use
bulma
andbulma-loader
on my project withnextjs
, but I keep getting this parsing error:here is webpack config file.
Thanks