I'm trying to migrate from webpack to parcel but in webpack i had my scss builder to add a resource.scss file to the head of every scss file in my project for variables/mixin's ect.
is that possible with parcel and im just missing it?
{
loader: 'sass-loader',
options: {
data: '@import "styles/resources";',
includePaths: [path.join(cwd, 'app')],
},
},
Same question here. That keeps me from migrating at the moment.
I'm using a .sassrc.js at the moment which works for includePaths but not for data:
const path = require('path');
const cwd = process.cwd();
module.exports = {
data: '@import "globals";',
includePaths: [
path.resolve(cwd, 'node_modules/susy/sass'),
path.resolve(cwd, 'node_modules/normalize.scss'),
path.resolve(cwd, 'node_modules'),
path.resolve(cwd, 'static', 'scss')
]
};
Fixed by #1035.
@steffenmllr how are you including that js file? just in your index?
@th3fallen I include per component. All my variables are in a globals.scss. Global styles (usually only a few) are included in the index.js
Most helpful comment
I'm using a
.sassrc.jsat the moment which works forincludePathsbut not fordata: