1 | const path = require('path')
|
2 |
|
3 | const AssetsPlugin = require('assets-webpack-plugin')
|
4 |
|
5 | const { clientConfig, serverConfig, } = require('./webpack.config')
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | clientConfig.entry.client = ['./src/client/entry.test.js']
|
11 |
|
12 | clientConfig.output = {
|
13 | path: path.resolve('./test/build/public'),
|
14 | filename: 'client.test.js',
|
15 | }
|
16 |
|
17 | clientConfig.node = { fs: 'empty' }
|
18 |
|
19 |
|
20 | clientConfig.plugins = clientConfig.plugins.filter(p => !(p instanceof AssetsPlugin))
|
21 |
|
22 |
|
23 |
|
24 | serverConfig.entry.server = ['./src/server/entry.test.js']
|
25 | serverConfig.output = {
|
26 | path: path.resolve('./test/build/server'),
|
27 | filename: 'server.test.js',
|
28 | libraryTarget: 'commonjs2',
|
29 | }
|
30 |
|
31 | module.exports = { clientConfig, serverConfig }
|