-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
73 lines (71 loc) · 1.68 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
module.exports = () => ({
entry: ['@babel/polyfill', './src/v1/index.js'],
output: {
path: path.join(__dirname, '/dist'),
filename: 'index.js',
publicPath: '/',
},
devServer: {
historyApiFallback: true,
},
devtool: 'source-map',
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
},
extensions: ['.js', '.jsx'],
},
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
},
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader', 'postcss-loader'],
},
{
test: /\.(pdf|jpg|png|gif|svg|ico|woff2)$/,
use: {
loader: 'file-loader',
options: {
name: 'assets/[path][name]-[hash].[ext]',
},
},
},
],
},
plugins: [
new HtmlWebpackPlugin({
template: './index.html',
}),
new webpack.EnvironmentPlugin({
API_URL: '/api',
SENTRY_DSN: '',
CLIENT_ID: '',
}),
new FaviconsWebpackPlugin({
logo: './src/v1/components/Logo/images/logo-75x75-blacked.png',
favicons: {
appName: 'Roving Climbers',
appShortName: 'RC',
appDescription: 'Climbing club',
developerName: 'Bitia',
developerURL: 'http://bitia.ru',
appleStatusBarStyle: 'black',
background: '#000',
theme_color: '#000',
orientation: 'portrait',
start_url: '/',
},
}),
],
});