mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-12 11:15:14 +00:00
46 lines
678 B
TypeScript
46 lines
678 B
TypeScript
import { locations, dev } from './config';
|
|
|
|
export default {
|
|
dev: dev(),
|
|
|
|
client: {
|
|
input: () => {
|
|
return `${locations.app()}/client.js`
|
|
},
|
|
|
|
output: () => {
|
|
return {
|
|
dir: `${locations.dest()}/client`,
|
|
entryFileNames: '[name].[hash].js',
|
|
chunkFileNames: '[name].[hash].js',
|
|
format: 'esm'
|
|
};
|
|
}
|
|
},
|
|
|
|
server: {
|
|
input: () => {
|
|
return `${locations.app()}/server.js`
|
|
},
|
|
|
|
output: () => {
|
|
return {
|
|
dir: locations.dest(),
|
|
format: 'cjs'
|
|
};
|
|
}
|
|
},
|
|
|
|
serviceworker: {
|
|
input: () => {
|
|
return `${locations.app()}/service-worker.js`;
|
|
},
|
|
|
|
output: () => {
|
|
return {
|
|
dir: locations.dest(),
|
|
format: 'iife'
|
|
}
|
|
}
|
|
}
|
|
}; |