Bump postcss from 7.0.35 to 7.0.36 (#8)
[ustaxviewer.git] / webpack.config.js
1 // Copyright 2020 Blue Static <https://www.bluestatic.org>
2 // This program is free software licensed under the GNU General Public License,
3 // version 3.0. The full text of the license can be found in LICENSE.txt.
4 // SPDX-License-Identifier: GPL-3.0-only
5
6 const path = require('path');
7 const webpack = require('webpack');
8
9 const ROOT = path.resolve(__dirname, 'src');
10
11 module.exports = {
12 entry: {
13 main: './src/index.tsx'
14 },
15
16 resolve: {
17 extensions: ['.ts', '.tsx', '.js'],
18 modules: [
19 ROOT,
20 'node_modules'
21 ]
22 },
23
24 module: {
25 rules: [
26 {
27 test: /\.tsx?$/,
28 exclude: /node_modules/,
29 use: [
30 {
31 loader: 'babel-loader',
32 options: { presets: ['solid'] }
33 },
34 'ts-loader'
35 ]
36 },
37 {
38 test: /\.css$/,
39 use: [
40 'style-loader',
41 {
42 loader: 'css-loader',
43 options: {
44 localsConvention: 'camelCaseOnly',
45 modules: {
46 localIdentName: '[path][name]_[local]_[hash:base64:2]'
47 }
48 }
49 }
50 ]
51 }
52 ]
53 },
54
55 devServer: {
56 contentBase: 'public/'
57 },
58
59 devtool: 'cheap-module-eval-source-map',
60
61 plugins: [
62 new (require('html-webpack-plugin'))({
63 inject: true,
64 template: 'public/index.html'
65 }),
66 ]
67 };