This commit is contained in:
Richard Harris
2019-02-03 00:14:53 -05:00
parent 66be631572
commit 3d7cfbbf3d
26 changed files with 131 additions and 135 deletions

View File

@@ -14,16 +14,16 @@ const external = [].concat(
function template(kind, external) {
return {
input: `templates/src/${kind}/index.ts`,
input: `runtime/src/${kind}/index.ts`,
output: {
file: `templates/${kind}.mjs`,
file: `runtime/${kind}.mjs`,
format: 'es',
paths: id => id.replace('@sapper', '.')
},
external,
plugins: [
resolve({
extensions: ['.js', '.ts']
extensions: ['.mjs', '.js', '.ts']
}),
commonjs(),
string({
@@ -37,8 +37,8 @@ function template(kind, external) {
}
export default [
template('app', ['__ROOT__', '__ERROR__', 'svelte', '@sapper/App.html']),
template('server', builtinModules),
template('app', id => /^(svelte\/?|@sapper\/)/.test(id)),
template('server', id => builtinModules.includes(id)),
{
input: [
@@ -57,7 +57,7 @@ export default [
plugins: [
json(),
resolve({
extensions: ['.js', '.ts']
extensions: ['.mjs', '.js', '.ts']
}),
commonjs(),
sucrase({