mirror of
https://github.com/aelve/guide.git
synced 2024-11-23 12:15:06 +03:00
469b5b5790
* DefferedPromise refactor * Moved defferedPromise to utils folder * Base url moved to app file * Store modules states rewrittten according to vue doc recommendations * Deffered promise usage moved * removed unused packages in entries * Structure refactor, easier building, prod building configured, tsconfig reconfigure removed useless packages * Update front/index.html Co-Authored-By: avele <34437766+avele@users.noreply.github.com> * Update front/postcss.config.js Co-Authored-By: avele <34437766+avele@users.noreply.github.com> * Comment rewritten
38 lines
932 B
JavaScript
38 lines
932 B
JavaScript
const path = require('path')
|
|
const merge = require('webpack-merge')
|
|
const nodeExternals = require('webpack-node-externals')
|
|
const VueSSRServerPlugin = require('vue-server-renderer/server-plugin')
|
|
const WebpackBar = require('webpackbar')
|
|
const baseConfig = require('./webpack.base.conf')
|
|
|
|
const isProduction = process.env.NODE_ENV === 'production'
|
|
|
|
const webpackConfig = merge(baseConfig, {
|
|
mode: isProduction ? 'production' : 'development',
|
|
target: 'node',
|
|
devtool: isProduction ? false : 'source-map',
|
|
entry: path.resolve(__dirname, '../client/entry.server.ts'),
|
|
output: {
|
|
filename: 'server-bundle.js',
|
|
libraryTarget: 'commonjs2'
|
|
},
|
|
externals: nodeExternals({
|
|
whitelist: [
|
|
/\.css$/,
|
|
/\.sass$/,
|
|
/\.scss$/,
|
|
/\.svg$/
|
|
]
|
|
}),
|
|
|
|
plugins: [
|
|
new VueSSRServerPlugin(),
|
|
new WebpackBar({
|
|
name: 'Server',
|
|
color: 'orange'
|
|
})
|
|
]
|
|
})
|
|
|
|
module.exports = webpackConfig
|