better production build

This commit is contained in:
Rachel
2024-03-29 15:13:31 -07:00
parent 875a0832c6
commit 5130fb1695
11 changed files with 2158 additions and 47803 deletions

View File

@@ -17,6 +17,7 @@ module.exports = {
hot: true
},
mode: "development",
devtool: "eval-source-map",
plugins: [
new CopyWebpackPlugin({ patterns: ['img/*.png', 'img/*/*.png'] }),
new HtmlWebpackPlugin({ template: './src/index.html' }),
@@ -29,6 +30,10 @@ module.exports = {
use: 'ts-loader',
exclude: /node_modules/,
},
{
test: /\.(jpg|png|svg|gif)$/,
type: 'asset/resource',
},
{
test: /\.(scss)$/,
use: [{
@@ -45,7 +50,7 @@ module.exports = {
// if you use postcss 7.x skip the key
postcssOptions: {
// postcss plugins, can be exported to postcss.config.js
plugins: function() {
plugins: function () {
return [
require('autoprefixer')
];
@@ -63,7 +68,7 @@ module.exports = {
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
fallback: {
fallback: {
"crypto": require.resolve("crypto-browserify"),
"buffer": require.resolve("buffer"),
"stream": require.resolve("stream-browserify"),