mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-12-18 21:33:25 +00:00
Upgraded to webpack4
This commit is contained in:
@@ -1,7 +1,33 @@
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const Visualizer = require('webpack-visualizer-plugin');
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
main: './src/frontend/js/main.js',
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
filename: '[name].js',
|
||||
publicPath: '/'
|
||||
},
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
use: {
|
||||
loader: 'babel-loader'
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.ejs$/,
|
||||
loader: 'ejs-loader'
|
||||
}
|
||||
]
|
||||
},
|
||||
/*
|
||||
context: __dirname + '/src/frontend/js',
|
||||
entry: './main.js',
|
||||
output: {
|
||||
@@ -15,7 +41,7 @@ module.exports = {
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /(node_modules|bower_components)/,
|
||||
loader: 'babel-loader',
|
||||
loader: 'babel-loader'//,
|
||||
query: {
|
||||
presets: ['@babel/es2015']
|
||||
}
|
||||
@@ -26,6 +52,22 @@ module.exports = {
|
||||
}
|
||||
]
|
||||
},
|
||||
*/
|
||||
plugins: [
|
||||
new webpack.ProvidePlugin({
|
||||
$: 'jquery',
|
||||
jQuery: 'jquery',
|
||||
_: 'underscore'
|
||||
}),
|
||||
new Visualizer({
|
||||
filename: '../webpack_stats.html'
|
||||
}),
|
||||
new webpack.optimize.LimitChunkCountPlugin({
|
||||
maxChunks: 1, // Must be greater than or equal to one
|
||||
minChunkSize: 999999999
|
||||
})
|
||||
]
|
||||
/*
|
||||
plugins: [
|
||||
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
|
||||
new webpack.optimize.LimitChunkCountPlugin({
|
||||
@@ -49,4 +91,5 @@ module.exports = {
|
||||
}
|
||||
})
|
||||
]
|
||||
*/
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user