better production build
This commit is contained in:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user