mirror of https://github.com/sveltejs/svelte
parent
07ce8236a4
commit
d21336bb79
@ -1,7 +1,10 @@
|
|||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import compile from './compile.js';
|
import { compile } from '../index.js';
|
||||||
|
|
||||||
require.extensions[ '.html' ] = function ( module, filename ) {
|
require.extensions[ '.html' ] = function ( module, filename ) {
|
||||||
const { code } = compile( fs.readFileSync( filename, 'utf-8' ), { filename });
|
const { code } = compile( fs.readFileSync( filename, 'utf-8' ), {
|
||||||
|
filename,
|
||||||
|
generate: 'ssr'
|
||||||
|
});
|
||||||
return module._compile( code, filename );
|
return module._compile( code, filename );
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in new issue