@ -21,31 +21,6 @@ const ts_plugin = is_publish
const external = id => id . startsWith ( 'svelte/' ) ;
export default [
/* compiler.js */
{
input : 'src/compiler/index.ts' ,
plugins : [
replace ( {
_ _VERSION _ _ : pkg . version
} ) ,
resolve ( ) ,
commonjs ( {
include : [ 'node_modules/**' ]
} ) ,
json ( ) ,
ts _plugin
] ,
output : {
file : 'compiler.js' ,
format : is _publish ? 'umd' : 'cjs' ,
name : 'svelte' ,
sourcemap : true ,
} ,
external : is _publish
? [ ]
: id => id === 'acorn' || id === 'magic-string' || id . startsWith ( 'css-tree' )
} ,
/* runtime */
{
input : ` src/runtime/index.ts ` ,
@ -86,12 +61,37 @@ export default [
ts _plugin ,
dir === 'internal' && {
generateBundle ( options , bundle ) {
const mod = bundle [ 'in ternal .mjs'] ;
const mod = bundle [ 'in dex .mjs'] ;
if ( mod ) {
fs . writeFileSync ( 'src/compile /internal-exports.ts', ` // This file is automatically generated \n export default new Set( ${ JSON . stringify ( mod . exports ) } ); ` ) ;
fs . writeFileSync ( 'src/compile r/compile /internal-exports.ts', ` // This file is automatically generated \n export default new Set( ${ JSON . stringify ( mod . exports ) } ); ` ) ;
}
}
}
]
} ) )
} ) ) ,
/* compiler.js */
{
input : 'src/compiler/index.ts' ,
plugins : [
replace ( {
_ _VERSION _ _ : pkg . version
} ) ,
resolve ( ) ,
commonjs ( {
include : [ 'node_modules/**' ]
} ) ,
json ( ) ,
ts _plugin
] ,
output : {
file : 'compiler.js' ,
format : is _publish ? 'umd' : 'cjs' ,
name : 'svelte' ,
sourcemap : true ,
} ,
external : is _publish
? [ ]
: id => id === 'acorn' || id === 'magic-string' || id . startsWith ( 'css-tree' )
}
] ;