Skip to content

Commit

Permalink
Fix webpack size
Browse files Browse the repository at this point in the history
  • Loading branch information
LasCC committed Jan 29, 2022
1 parent 44017f9 commit 268b2be
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ const lessLoader = {
module.exports = {
mode: 'development',
entry: {
app: './src/App.tsx',
vendor: [ 'react', 'react-dom' ]
app: './src/App.tsx'
},
devtool: 'source-map',
plugins: [
new webpack.HotModuleReplacementPlugin(),
new CleanWebpackPlugin(),
Expand Down Expand Up @@ -69,6 +67,11 @@ module.exports = {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist')
},
optimization: {
splitChunks: {
chunks: 'all'
}
},
module: {
rules: [
{
Expand All @@ -81,11 +84,6 @@ module.exports = {
loader: 'ts-loader',
exclude: /node_modules/
},
/* {
test: /\.css$/,
include: path.resolve(__dirname, 'src'),
use: [ 'style-loader', 'css-loader' ]
}, */
{
test: /\.(png|svg|jpg|gif)$/,
include: path.resolve(__dirname, 'src'),
Expand Down

0 comments on commit 268b2be

Please sign in to comment.