Files
nym/nym-wallet/webpack.common.js
2021-12-13 13:03:23 +00:00

46 lines
1.0 KiB
JavaScript

const HtmlWebpackPlugin = require('html-webpack-plugin')
const FaviconsWebpackPlugin = require('favicons-webpack-plugin')
const Dotenv = require('dotenv-webpack')
var path = require('path')
module.exports = {
entry: path.resolve(__dirname, '/src/index'),
plugins: [
new HtmlWebpackPlugin({
template: path.resolve(__dirname, 'public/index.html'),
filename: 'index.html',
}),
new FaviconsWebpackPlugin(path.resolve(__dirname, 'public/favicon.ico')),
new Dotenv(),
],
module: {
rules: [
{
test: /\.(ts|tsx)$/,
exclude: /node_modules/,
use: ['babel-loader'],
},
{
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
},
{
test: /\.(png|jpe?g|gif)$/i,
use: [
{
loader: 'file-loader',
},
],
},
{
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: ['@svgr/webpack'],
},
],
},
resolve: {
extensions: ['*', '.js', '.jsx', '.ts', '.tsx'],
},
}