refactor: use SASS @use over @import
This commit is contained in:
@@ -1,18 +1,16 @@
|
||||
import { sveltePreprocess } from 'svelte-preprocess'
|
||||
import adapter from '@sveltejs/adapter-cloudflare'
|
||||
import { fileURLToPath } from 'url'
|
||||
import { dirname } from 'path'
|
||||
import { sveltePreprocess } from 'svelte-preprocess'
|
||||
import adapter from '@sveltejs/adapter-cloudflare'
|
||||
|
||||
const stylePath = `${dirname(fileURLToPath(import.meta.url))}/src/style`
|
||||
export const scssImports = `@use "${stylePath}/imports.scss" as *;`
|
||||
export const globalStyles = `@use "${dirname(fileURLToPath(import.meta.url))}/src/style/imports" as *;`
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
const config = {
|
||||
// Preprocessors docs: https://github.com/sveltejs/svelte-preprocess
|
||||
preprocess: sveltePreprocess({
|
||||
scss: {
|
||||
prependData: scssImports,
|
||||
renderSync: true,
|
||||
prependData: globalStyles,
|
||||
}
|
||||
}),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user