1
1
mirror of https://github.com/aelve/guide.git synced 2024-12-23 21:02:13 +03:00
guide/front/build/webpack.client.conf.js
avele 469b5b5790
Front/structure refactor and building reconfigure (#277)
* 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
2019-04-18 01:52:43 +04:00

40 lines
1.0 KiB
JavaScript

const path = require('path')
const merge = require('webpack-merge')
const VueSSRClientPlugin = require('vue-server-renderer/client-plugin')
const WebpackBar = require('webpackbar')
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin')
const baseConfig = require('./webpack.base.conf')
const isProduction = process.env.NODE_ENV === 'production'
const webpackConfig = merge(baseConfig, {
// Entry should be array cause of webpack-hot-client requirements
mode: isProduction ? 'production' : 'development',
entry: [path.resolve(__dirname, '../client/entry.client.ts')],
devtool: isProduction ? false : 'cheap-module-source-map',
optimization: {
splitChunks: {
name: 'manifest',
minChunks: Infinity
}
},
plugins: [
new VueSSRClientPlugin(),
new WebpackBar({
name: 'Client'
})
// TODO make it work
/* ,
new ForkTsCheckerWebpackPlugin({
vue: true,
tslint: true,
formatter: 'codeframe',
checkSyntacticErrors: false
}) */
]
})
module.exports = webpackConfig