Im trying to access my color pallete within the script tag of my component:
import pallete from "$src/style/pallete.scss";
but it is returning the export as a string:
:export {
mainColor: #e8d44d;
mainColorHover: #c0aa1d;
mainColorContrast: #1e1e1e;
mainContrastDark: #000000;
}
I know i need to add these webpack configurations as said in some articles that i read in my searching, like this one.
module.exports = {
// ...
module: {
rules: [
{
test: /\.scss$/,
use: ["style-loader", "css-loader", "sass-loader"]
},
// ...
]
}
};
but im fallowing the Sveltekit docs so i have no webpack.config.js
or rollup.config.js
Your
webpack.config.js
orrollup.config.js
should be replaced with asvelte.config.js
, as documented here.
What should i do?
As unlocomqx said on Reddit, im now using vite-plugin-css-export