41 lines
931 B
JavaScript
41 lines
931 B
JavaScript
|
const path = require('path');
|
||
|
const webpack = require('webpack');
|
||
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||
|
|
||
|
module.exports = {
|
||
|
entry: './public/src/entry-client.js',
|
||
|
output: {
|
||
|
path: path.resolve(__dirname, './public/dist'),
|
||
|
publicPath: '/dist/',
|
||
|
filename: 'js/build-client.js',
|
||
|
},
|
||
|
resolve: {
|
||
|
modules: [
|
||
|
'node_modules',
|
||
|
path.resolve(__dirname, 'public/src'),
|
||
|
],
|
||
|
extensions: ['.js', '.json', '.vue', '.css'],
|
||
|
},
|
||
|
module: {
|
||
|
loaders: [
|
||
|
{
|
||
|
test: /\.vue$/,
|
||
|
loader: 'vue',
|
||
|
},
|
||
|
{
|
||
|
test: /\.js$/,
|
||
|
loader: 'babel',
|
||
|
exclude: /node_modules/,
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
devtool: '#source-map',
|
||
|
plugins: [
|
||
|
new webpack.optimize.OccurrenceOrderPlugin(),
|
||
|
new CopyWebpackPlugin([{
|
||
|
from: path.resolve(__dirname, './node_modules/bulma/css'),
|
||
|
to: path.resolve(__dirname, './public/dist/css/'),
|
||
|
}]),
|
||
|
],
|
||
|
};
|