Skip to content

Commit

Permalink
Fix deprecated sass import
Browse files Browse the repository at this point in the history
  • Loading branch information
MattIPv4 committed Jan 17, 2024
1 parent a7d227f commit f43879c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/build.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import fs from 'node:fs/promises';
import { fileURLToPath } from 'node:url';
import posthtml from 'posthtml';
import posthtmlInclude from 'posthtml-include';
import { posthtmlInsertAt } from 'posthtml-insert-at';
import htmlnano from 'htmlnano';
import postcss from 'postcss';
import postcssUrl from 'postcss-url';
import sass from 'sass';
import { compileAsync } from 'sass';
import esbuild from 'esbuild';
import copy from 'recursive-copy';
import fs from 'fs/promises';
import { fileURLToPath } from 'url';

const main = async () => {
// Compile our SCSS w/ sass, and inline the images w/ postcss-url
const styleSource = fileURLToPath(new URL('./index.scss', import.meta.url));
const style = await sass.compileAsync(styleSource, { style: 'compressed' })
const style = await compileAsync(styleSource, { style: 'compressed' })
.then(({ css }) => postcss()
.use(postcssUrl({ url: 'inline', encodeType: 'base64' }))
.process(css, { from: styleSource }));
Expand Down

0 comments on commit f43879c

Please sign in to comment.