mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-12 11:15:14 +00:00
55 lines
880 B
TypeScript
55 lines
880 B
TypeScript
import { locations, dev } from './config';
|
|
|
|
export default {
|
|
dev: dev(),
|
|
|
|
client: {
|
|
entry: () => {
|
|
return {
|
|
main: `${locations.app()}/client`
|
|
};
|
|
},
|
|
|
|
output: () => {
|
|
return {
|
|
path: `${locations.dest()}/client`,
|
|
filename: '[hash]/[name].js',
|
|
chunkFilename: '[hash]/[name].[id].js',
|
|
publicPath: `client/`
|
|
};
|
|
}
|
|
},
|
|
|
|
server: {
|
|
entry: () => {
|
|
return {
|
|
server: `${locations.app()}/server`
|
|
};
|
|
},
|
|
|
|
output: () => {
|
|
return {
|
|
path: locations.dest(),
|
|
filename: '[name].js',
|
|
chunkFilename: '[hash]/[name].[id].js',
|
|
libraryTarget: 'commonjs2'
|
|
};
|
|
}
|
|
},
|
|
|
|
serviceworker: {
|
|
entry: () => {
|
|
return {
|
|
'service-worker': `${locations.app()}/service-worker`
|
|
};
|
|
},
|
|
|
|
output: () => {
|
|
return {
|
|
path: locations.dest(),
|
|
filename: '[name].js',
|
|
chunkFilename: '[name].[id].[hash].js'
|
|
}
|
|
}
|
|
}
|
|
}; |