mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-13 03:25:24 +00:00
wip
This commit is contained in:
44
src/webpack/index.js
Normal file
44
src/webpack/index.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import { dest, dev, entry } from '../config.js';
|
||||
|
||||
export default {
|
||||
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'
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user