combine.fm/webpack.config.server.js
Jonathan Cremin 7bb0497ff4 Migrate all the things
* Migrates from Mongo to Postgres.
* Migrates from JSPM to Webpack.
* Migrates from React to Vuejs.
* Migrates from Bootstrap to Bulma.

Also:
* Fixes rendering of meta data in the document head tag.
2016-10-23 21:36:23 +01:00

49 lines
1.1 KiB
JavaScript

const path = require('path');
const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
target: 'node',
entry: './public/src/entry-server.js',
output: {
libraryTarget: 'commonjs2',
path: path.resolve(__dirname, './public/dist'),
publicPath: '/dist/',
filename: 'js/build-server.js',
},
resolve: {
modules: [
'node_modules',
path.resolve(__dirname, 'public/src'),
],
extensions: ['.js', '.json', '.vue', '.css'],
},
plugins: [
new webpack.DefinePlugin({
'global.GENTLY': false,
}),
new webpack.optimize.OccurrenceOrderPlugin(),
new CopyWebpackPlugin([{
from: path.resolve(__dirname, './node_modules/bulma/css'),
to: path.resolve(__dirname, './public/dist/css/'),
}]),
],
module: {
loaders: [
{
test: /\.vue$/,
loader: 'vue',
},
{
test: /\.js$/,
loader: 'babel',
exclude: /node_modules/,
},
{
test: /\.json$/,
loader: 'json',
},
],
},
devtool: '#source-map',
};