mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-12 11:15:14 +00:00
45 lines
773 B
JavaScript
45 lines
773 B
JavaScript
const { dest, dev, entry } = require('../lib/config.js');
|
|
|
|
module.exports = {
|
|
dev,
|
|
|
|
client: {
|
|
entry: () => {
|
|
return {
|
|
main: [
|
|
entry.client,
|
|
// 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: '[name].[hash].js',
|
|
chunkFilename: '[name].[id].[hash].js',
|
|
publicPath: '/client/'
|
|
};
|
|
}
|
|
},
|
|
|
|
server: {
|
|
entry: () => {
|
|
return {
|
|
main: entry.server
|
|
};
|
|
},
|
|
|
|
output: () => {
|
|
return {
|
|
path: `${dest}/server`,
|
|
filename: '[name].[hash].js',
|
|
chunkFilename: '[name].[id].[hash].js',
|
|
libraryTarget: 'commonjs2'
|
|
};
|
|
}
|
|
}
|
|
};
|