Skip to content

Commit

Permalink
Merge pull request #168 from moevm/minimize
Browse files Browse the repository at this point in the history
  • Loading branch information
HadronCollider authored Sep 23, 2021
2 parents 6fbf11c + 59a4118 commit eee8d7f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
5 changes: 3 additions & 2 deletions templates/root.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
{% block main %}{% endblock %}
</div>

<script src={{ url_for("static", filename="all.min.js") }}></script>
</html>
<script src={{ url_for("static", filename="vendors.js") }}></script>
<script src={{ url_for("static", filename="main.js") }}></script>
</html>
13 changes: 11 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,19 @@ module.exports = {
entry: ['core-js/stable', 'regenerator-runtime/runtime', "./assets/scripts/main.js"],
output: {
path: path.join(__dirname, './src/'),
filename: "./all.min.js"
filename: "./[name].js"
},
optimization: {
minimize: true
splitChunks: {
cacheGroups: {
vendor: {
name: 'vendors',
test: /node_modules/,
chunks: 'all',
enforce: true
}
}
}
},
module: {
rules: [
Expand Down

0 comments on commit eee8d7f

Please sign in to comment.