mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-03-16 22:10:27 +00:00
47 lines
1.3 KiB
JavaScript
47 lines
1.3 KiB
JavaScript
import webpack from 'webpack';
|
|
import merge from 'webpack-merge';
|
|
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
|
import FriendlyErrorsPlugin from 'friendly-errors-webpack-plugin';
|
|
import baseWebpackConfig from './base';
|
|
import config from '../config';
|
|
|
|
Object.keys(baseWebpackConfig.entry).forEach((name) => {
|
|
baseWebpackConfig.entry[name] = ['./build/server/client', ...[baseWebpackConfig.entry[name]]];
|
|
});
|
|
|
|
export default merge(baseWebpackConfig, {
|
|
devtool: '#cheap-module-eval-source-map',
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.vue$/,
|
|
loader: 'vue-loader',
|
|
options: {
|
|
loaders: {
|
|
css: 'vue-style-loader!css-loader',
|
|
scss: 'vue-style-loader!css-loader!sass-loader'
|
|
}
|
|
}
|
|
},
|
|
{
|
|
test: /\.css$/,
|
|
use: ['vue-style-loader', 'css-loader']
|
|
},
|
|
{
|
|
test: /\.scss$/,
|
|
use: ['vue-style-loader', 'css-loader', 'sass-loader']
|
|
}
|
|
]
|
|
},
|
|
plugins: [
|
|
new webpack.WatchIgnorePlugin([config.nodePath]),
|
|
new webpack.HotModuleReplacementPlugin(),
|
|
new webpack.NoEmitOnErrorsPlugin(),
|
|
new HtmlWebpackPlugin({
|
|
filename: 'index.html',
|
|
template: 'docs/index.html',
|
|
inject: true
|
|
}),
|
|
new FriendlyErrorsPlugin()
|
|
]
|
|
});
|