-
Notifications
You must be signed in to change notification settings - Fork 5
/
webpack.config.js
32 lines (31 loc) · 994 Bytes
/
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
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
mode: process.env.NODE_ENV ? process.env.NODE_ENV : 'development',
entry: './src/App.bc.js',
module: {
rules: [
{
test: /\.s?css$/,
use: [
'style-loader',
'css-loader',
{
loader: 'postcss-loader',
options: { postcssOptions: { plugins: ['autoprefixer'] } },
},
'sass-loader',
],
},
{
test: /\.ttf$/,
use: 'file-loader',
},
],
},
plugins: [new HtmlWebpackPlugin({ template: 'public/index.html' })],
resolve: { fallback: { child_process: false, constants: false, fs: false, tty: false } },
devServer: {
contentBase: path.resolve(__dirname, 'public'),
},
};