1
0
mirror of https://github.com/trambarhq/relaks-wordpress-example.git synced 2025-09-03 05:02:34 +02:00

Reworked code.

This commit is contained in:
Chung Leong
2019-04-19 00:06:10 +02:00
parent da30bc22a6
commit c66323e17d
58 changed files with 454 additions and 348 deletions

View File

@@ -1,3 +1,4 @@
var _ = require('lodash');
var FS = require('fs');
var Path = require('path');
var Webpack = require('webpack');
@@ -35,7 +36,7 @@ var clientConfig = {
exclude: /node_modules/,
query: {
presets: [
'env',
[ 'env', { modules: false } ],
'react',
'stage-0',
],
@@ -85,19 +86,22 @@ var clientConfig = {
chunkFilename: "[id].css"
}),
],
optimization: {
concatenateModules: false,
},
devtool: (EVENT === 'build') ? 'source-map' : 'inline-source-map',
};
var serverConfig = {
mode: clientConfig.mode,
context: clientConfig.context,
entry: clientConfig.entry,
entry: './ssr',
target: 'node',
output: {
path: Path.resolve('./server/client'),
publicPath: BASE_PATH,
filename: 'front-end.js',
libraryTarget: 'commonjs2',
libraryTarget: 'commonjs',
},
resolve: clientConfig.resolve,
module: clientConfig.module,