mirror of https://github.com/sveltejs/svelte
Merge pull request #159 from sveltejs/compiler-mode
add a compiler option to output SSR codepull/164/head
commit
5722e3a248
@ -1,7 +1,10 @@
|
||||
import * as fs from 'fs';
|
||||
import compile from './compile.js';
|
||||
import { compile } from '../index.js';
|
||||
|
||||
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 );
|
||||
};
|
||||
|
Loading…
Reference in new issue