mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-13 11:35:28 +00:00
45 lines
768 B
TypeScript
45 lines
768 B
TypeScript
import { dest, isDev, entry } from '../config';
|
|
|
|
export default {
|
|
dev: isDev(),
|
|
|
|
client: {
|
|
entry: () => {
|
|
return {
|
|
main: [
|
|
'./app/client.js',
|
|
// workaround for https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/456
|
|
'style-loader/lib/addStyles',
|
|
'css-loader/lib/css-base'
|
|
]
|
|
};
|
|
},
|
|
|
|
output: () => {
|
|
return {
|
|
path: `${dest}/client`,
|
|
filename: '[hash]/[name].js',
|
|
chunkFilename: '[hash]/[name].[id].js',
|
|
publicPath: '/client/'
|
|
};
|
|
}
|
|
},
|
|
|
|
server: {
|
|
entry: () => {
|
|
return {
|
|
server: './app/server.js'
|
|
};
|
|
},
|
|
|
|
output: () => {
|
|
return {
|
|
path: `${dest}`,
|
|
filename: '[name].js',
|
|
chunkFilename: '[hash]/[name].[id].js',
|
|
libraryTarget: 'commonjs2'
|
|
};
|
|
}
|
|
}
|
|
};
|