Add prod config for the wallet
When supplying `production` as the mode in the config for webpack, it complains about an unmet dependency issue with fav-icons. Then trying to supply a favicon.ico, returns a mimetype error. By using a png in alignment to the .ico. It builds. Tested on Linux.
This commit is contained in:
@@ -6,10 +6,11 @@
|
||||
"scripts": {
|
||||
"webpack:dev": "yarn webpack serve",
|
||||
"webpack:build": "yarn webpack",
|
||||
"webpack:prod": "yarn webpack --progress --config webpack.prod.config.js",
|
||||
"tauri:dev": "yarn tauri dev",
|
||||
"tauri:build": "yarn tauri build",
|
||||
"dev": "yarn run webpack:dev & yarn run tauri:dev",
|
||||
"build": "yarn run webpack:build & yarn run tauri:build"
|
||||
"dev": "yarn run-s webpack:dev tauri:dev",
|
||||
"build:prod": "run-s webpack:prodbuild tauri:build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/preset-typescript": "^7.15.0",
|
||||
@@ -44,9 +45,11 @@
|
||||
"@types/semver": "^7.3.8",
|
||||
"babel-loader": "^8.2.2",
|
||||
"css-loader": "^6.2.0",
|
||||
"favicons": "^6.2.2",
|
||||
"favicons-webpack-plugin": "^5.0.2",
|
||||
"file-loader": "^6.2.0",
|
||||
"html-webpack-plugin": "^5.3.2",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"style-loader": "^3.2.1",
|
||||
"url-loader": "^4.1.1",
|
||||
"webpack": "^5.64.3",
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,42 @@
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||
const FaviconsWebpackPlugin = require('favicons-webpack-plugin')
|
||||
var path = require('path')
|
||||
|
||||
module.exports = {
|
||||
mode: 'production',
|
||||
node: {
|
||||
__dirname: false
|
||||
},
|
||||
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.png')),
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.(ts|tsx)$/,
|
||||
exclude: /node_modules/,
|
||||
use: ['babel-loader'],
|
||||
},
|
||||
{
|
||||
test: /\.css$/i,
|
||||
use: ['style-loader', 'css-loader'],
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpe?g|gif|svg)$/i,
|
||||
use: [
|
||||
{
|
||||
loader: 'file-loader',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['*', '.js', '.jsx', '.ts', '.tsx'],
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user