generated from alecodes/base-template
fix: add support for sass extension
This commit is contained in:
parent
cf0ea28fa1
commit
b032ab7cd0
1 changed files with 1 additions and 2 deletions
3
index.ts
3
index.ts
|
|
@ -16,7 +16,7 @@ const sassPlugin: BunPlugin = {
|
||||||
async setup(build: PluginBuilder) {
|
async setup(build: PluginBuilder) {
|
||||||
const sass = await import("sass");
|
const sass = await import("sass");
|
||||||
|
|
||||||
build.onLoad({ filter: /\.scss$/ }, async ({ path }) => {
|
build.onLoad({ filter: /\.scss|sass$/ }, async ({ path }) => {
|
||||||
const result = await sass.compileAsync(path, {
|
const result = await sass.compileAsync(path, {
|
||||||
importers: [nodeModuleImporter],
|
importers: [nodeModuleImporter],
|
||||||
});
|
});
|
||||||
|
|
@ -30,4 +30,3 @@ const sassPlugin: BunPlugin = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export default sassPlugin;
|
export default sassPlugin;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue