mirror of
https://github.com/mgerb/classic-wow-forums
synced 2026-01-11 09:32:51 +00:00
added client things - finished home page
This commit is contained in:
77
client/webpack.config.js
Normal file
77
client/webpack.config.js
Normal file
@@ -0,0 +1,77 @@
|
||||
const CleanWebpackPlugin = require('clean-webpack-plugin');
|
||||
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const FaciconsWebpackPlugin = require('favicons-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
app: './app/app.tsx',
|
||||
vendor: ['react', 'react-dom'],
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, '../priv/static'),
|
||||
filename: '[name].[hash].js',
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.ts', '.tsx', '.js'],
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.(js|jsx)$/,
|
||||
use: ['babel-loader'],
|
||||
},
|
||||
{
|
||||
test: /\.ts(x)?$/,
|
||||
use: ['babel-loader', 'ts-loader'],
|
||||
},
|
||||
{
|
||||
test: /\.scss$/,
|
||||
use: ExtractTextPlugin.extract({
|
||||
fallback: 'style-loader',
|
||||
use: ['css-loader', 'postcss-loader', 'sass-loader'],
|
||||
}),
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: ExtractTextPlugin.extract({
|
||||
fallback: 'style-loader',
|
||||
use: ['css-loader'],
|
||||
}),
|
||||
},
|
||||
{
|
||||
test: /\.woff2?$|\.ttf$|\.eot$|\.svg$|\.gif$|\.jpg$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
name: 'assets/[name].[hash].[ext]',
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new CleanWebpackPlugin(['dist'], {
|
||||
verbose: true,
|
||||
}),
|
||||
new ExtractTextPlugin({
|
||||
filename: '[name].[hash].css',
|
||||
disable: false,
|
||||
allChunks: true
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
filename: 'index.html',
|
||||
template: './index.html',
|
||||
}),
|
||||
new webpack.optimize.CommonsChunkPlugin({
|
||||
name: ['vendor', 'manifest'],
|
||||
minChunks: 'Infinity',
|
||||
}),
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
new FaciconsWebpackPlugin('./favicon.png'),
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user