File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -8,18 +8,6 @@ import {isErrnoException} from './utils';
8
8
9
9
/** The path to the embedded compiler executable. */
10
10
export const compilerPath = ( ( ) => {
11
- try {
12
- return require . resolve (
13
- `sass-embedded-${ process . platform } -${ process . arch } /` +
14
- 'dart-sass-embedded/dart-sass-embedded' +
15
- ( process . platform === 'win32' ? '.bat' : '' )
16
- ) ;
17
- } catch ( e : unknown ) {
18
- if ( ! ( isErrnoException ( e ) && e . code === 'MODULE_NOT_FOUND' ) ) {
19
- throw e ;
20
- }
21
- }
22
-
23
11
// find for development
24
12
for ( const path of [ 'vendor' , '../../../lib/src/vendor' ] ) {
25
13
const executable = p . resolve (
@@ -33,6 +21,18 @@ export const compilerPath = (() => {
33
21
if ( fs . existsSync ( executable ) ) return executable ;
34
22
}
35
23
24
+ try {
25
+ return require . resolve (
26
+ `sass-embedded-${ process . platform } -${ process . arch } /` +
27
+ 'dart-sass-embedded/dart-sass-embedded' +
28
+ ( process . platform === 'win32' ? '.bat' : '' )
29
+ ) ;
30
+ } catch ( e : unknown ) {
31
+ if ( ! ( isErrnoException ( e ) && e . code === 'MODULE_NOT_FOUND' ) ) {
32
+ throw e ;
33
+ }
34
+ }
35
+
36
36
throw new Error (
37
37
"Embedded Dart Sass couldn't find the embedded compiler executable. " +
38
38
'Please make sure the optional dependency ' +
You can’t perform that action at this time.
0 commit comments