high file size
See original GitHub issueI have a babylon project with a webpack config which is very similar to yours but when i’m compiling files to dist, my babylonBundle.js is strangely heavier than it have to be. (4.9 Mo). Do you have an idea of this ?
webpack.common.js :
const path = require('path');
const fs = require('fs');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
const {
CleanWebpackPlugin
} = require('clean-webpack-plugin');
// App directory
const appDirectory = fs.realpathSync(process.cwd());
module.exports = {
entry: {
app: path.resolve(appDirectory, "src/index.ts"),
},
output: {
filename: 'js/babylonBundle.js',
},
resolve: {
extensions: ['.ts', '.js']
},
module: {
rules: [{
test: /\.(js|mjs|jsx|ts|tsx)$/,
loader: 'source-map-loader',
enforce: 'pre',
},
{
test: /\.tsx?$/,
loader: 'ts-loader'
},
{
test: /\.(png|jpg|gif|env|glb|stl|obj|mtl)$/i,
use: [{
loader: 'url-loader',
}, ],
},
]
},
plugins: [
new CleanWebpackPlugin(),
new HtmlWebpackPlugin({
inject: true,
template: path.resolve(appDirectory, "public/index.html"),
}),
new CopyPlugin({
patterns: [
{ from: 'assets', to: 'assets' },
],
}),
],
// Just for ammo
node: {
fs: 'empty'
}
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Understanding file sizes | GreenNet
Every file on a computer uses a certain amount of resources when sent over the internet or stored. Keeping mind of your kilobytes...
Read more >word request - How to say a file is very big?
1. There is nothing wrong with very big. A common phrase for your case would be "The file was very big." or "The...
Read more >My documents are too large to upload. How do I reduce the ...
First, make sure you know the file size limit for the online application you use. Depending on what you're applying for, the limit...
Read more >File sizes | AP CSP (article) | Khan Academy
Once a file size is bigger than 1024 1024 10241024 kilobytes (or 1000 1000 10001000, depending which computer you ask), we can start...
Read more >File Size Guidelines - University of St. Thomas
of restrictions imposed on the size of files uploaded into Blackboard. ... As a rule, files over 50 MB are considered “large” files...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Exactly like that 😃
Thanks for the quick answer! Ok so like this :