0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00

pass filename through to SSR compiler

This commit is contained in:
Rich Harris 2016-12-07 17:03:47 -05:00
parent 3cab77fb87
commit 7d672fdd78

View File

@ -2,7 +2,7 @@ import * as fs from 'fs';
import compile from './compile.js';
require.extensions[ '.html' ] = function ( module, filename ) {
const { code } = compile( fs.readFileSync( filename, 'utf-8' ) );
const { code } = compile( fs.readFileSync( filename, 'utf-8' ), filename );
try {
return module._compile( code, filename );