Skip to content

Commit

Permalink
Better webpack chunking
Browse files Browse the repository at this point in the history
  • Loading branch information
jc21 committed Nov 6, 2018
1 parent a73cbc7 commit c15edf3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nginx-proxy-manager",
"version": "2.0.3",
"version": "2.0.4",
"description": "A beautiful interface for creating Nginx endpoints",
"main": "src/backend/index.js",
"devDependencies": {
Expand Down Expand Up @@ -30,8 +30,8 @@
"style-loader": "^0.22.1",
"tabler-ui": "git+https://github.com/tabler/tabler.git",
"underscore": "^1.8.3",
"webpack": "^4.12.0",
"webpack-cli": "^3.0.8",
"webpack": "^4.25.1",
"webpack-cli": "^3.1.2",
"webpack-visualizer-plugin": "^0.1.11"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/backend/views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<span class="loader"></span>
</div>

<script type="text/javascript" src="/js/main.js?v=<%= version %>"></script>
<script type="text/javascript" src="/js/main.bundle.js?v=<%= version %>"></script>
<%- include partials/footer.ejs %>
2 changes: 1 addition & 1 deletion src/backend/views/login.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<span class="loader"></span>
</div>

<script type="text/javascript" src="/js/login.js?v=<%= version %>"></script>
<script type="text/javascript" src="/js/main.bundle.js?v=<%= version %>"></script>
<%- include partials/footer.ejs %>
13 changes: 5 additions & 8 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ module.exports = {
login: './src/frontend/js/login.js'
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'js/[name].js',
publicPath: '/'
path: path.resolve(__dirname, 'dist'),
filename: 'js/[name].bundle.js',
chunkFilename: 'js/[name].bundle.[id].js',
publicPath: '/'
},
resolve: {
alias: {
Expand Down Expand Up @@ -108,10 +109,6 @@ module.exports = {
to: 'images',
toType: 'dir',
context: '/app'
}]),
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1, // Must be greater than or equal to one
minChunkSize: 999999999
})
}])
]
};

0 comments on commit c15edf3

Please sign in to comment.