Skip to content

Commit 242ecfa

Browse files
author
Ives van Hoorne
committed
Fix Preact transpilers
1 parent 5cf3426 commit 242ecfa

File tree

1 file changed

+5
-5
lines changed
  • packages/app/src/sandbox/eval/presets/preact-cli

1 file changed

+5
-5
lines changed

packages/app/src/sandbox/eval/presets/preact-cli/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ const cssModulesPaths = [
5959
];
6060

6161
const cssModulesRegex = extension =>
62-
new RegExp(`^(${cssModulesPaths.join('|')})\/.*\.${extension}$`);
62+
new RegExp(`^(${cssModulesPaths.join('|')})\\/.*\\.${extension}$`);
6363

6464
const cssTypes = {
6565
css: [],
66-
's[a|c]ss': [sassTranspiler],
67-
less: [lessTranspiler],
68-
styl: [stylusTranspiler],
66+
's[a|c]ss': [{ transpiler: sassTranspiler }],
67+
less: [{ transpiler: lessTranspiler }],
68+
styl: [{ transpiler: stylusTranspiler }],
6969
};
7070

7171
Object.keys(cssTypes).forEach(cssType => {
@@ -78,7 +78,7 @@ Object.keys(cssTypes).forEach(cssType => {
7878
);
7979

8080
preactPreset.registerTranspiler(
81-
module => new RegExp(`\.${cssType}$`).test(module.path),
81+
module => new RegExp(`\\.${cssType}$`).test(module.path),
8282
[...cssTypes[cssType], { transpiler: stylesTranspiler }]
8383
);
8484
});

0 commit comments

Comments
 (0)