|
|
@ -52,45 +52,31 @@ export default [
|
|
|
|
experimentalCodeSplitting: true
|
|
|
|
experimentalCodeSplitting: true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
/* internal.[m]js */
|
|
|
|
/* internal.[m]js, motion.mjs */
|
|
|
|
{
|
|
|
|
...['internal', 'motion'].map(name => ({
|
|
|
|
input: 'src/internal/index.js',
|
|
|
|
input: `src/${name}/index.js`,
|
|
|
|
output: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
file: 'internal.mjs',
|
|
|
|
|
|
|
|
format: 'esm'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
file: 'internal.js',
|
|
|
|
|
|
|
|
format: 'cjs'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* motion.[m]js */
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
input: 'src/motion/index.js',
|
|
|
|
|
|
|
|
output: [
|
|
|
|
output: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
file: 'motion.mjs',
|
|
|
|
file: `${name}.mjs`,
|
|
|
|
format: 'esm',
|
|
|
|
format: 'esm',
|
|
|
|
paths: id => id.replace('svelte', '.')
|
|
|
|
paths: id => id.startsWith('svelte/') && id.replace('svelte', '.')
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
file: 'motion.js',
|
|
|
|
file: `${name}.js`,
|
|
|
|
format: 'cjs',
|
|
|
|
format: 'cjs',
|
|
|
|
paths: id => id.replace('svelte', '.')
|
|
|
|
paths: id => id.startsWith('svelte/') && id.replace('svelte', '.')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
external: id => id.startsWith('svelte/')
|
|
|
|
external: id => id.startsWith('svelte/')
|
|
|
|
},
|
|
|
|
})),
|
|
|
|
|
|
|
|
|
|
|
|
// runtime API
|
|
|
|
// everything else
|
|
|
|
...['index', 'store', 'easing', 'motion', 'transition'].map(name => ({
|
|
|
|
...['index', 'store', 'easing', 'transition'].map(name => ({
|
|
|
|
input: `${name}.mjs`,
|
|
|
|
input: `${name}.mjs`,
|
|
|
|
output: {
|
|
|
|
output: {
|
|
|
|
file: `${name}.js`,
|
|
|
|
file: `${name}.js`,
|
|
|
|
format: 'cjs'
|
|
|
|
format: 'cjs',
|
|
|
|
|
|
|
|
paths: id => id.startsWith('svelte/') && id.replace('svelte', '.')
|
|
|
|
},
|
|
|
|
},
|
|
|
|
external: id => id !== `${name}.mjs`
|
|
|
|
external: id => id !== `${name}.mjs`
|
|
|
|
}))
|
|
|
|
}))
|
|
|
|