mirror of
https://github.com/jc21/nginx-proxy-manager.git
synced 2024-08-30 18:22:48 +00:00
Upgraded to webpack4
This commit is contained in:
parent
2111d2913b
commit
3dee0eba4e
12
manager/.babelrc
Normal file
12
manager/.babelrc
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"presets": [
|
||||||
|
["env", {
|
||||||
|
"targets": {
|
||||||
|
"browsers": ["Chrome >= 65"]
|
||||||
|
},
|
||||||
|
"debug": false,
|
||||||
|
"modules": false,
|
||||||
|
"useBuiltIns": "usage"
|
||||||
|
}]
|
||||||
|
]
|
||||||
|
}
|
@ -7,7 +7,8 @@ const gulp = require('gulp');
|
|||||||
const gutil = require('gulp-util');
|
const gutil = require('gulp-util');
|
||||||
const concat = require('gulp-concat-util');
|
const concat = require('gulp-concat-util');
|
||||||
const runSequence = require('run-sequence');
|
const runSequence = require('run-sequence');
|
||||||
const webpack = require('webpack-stream');
|
const webpack = require('webpack');
|
||||||
|
const webpackStream = require('webpack-stream');
|
||||||
const imagemin = require('gulp-imagemin');
|
const imagemin = require('gulp-imagemin');
|
||||||
const del = require('del');
|
const del = require('del');
|
||||||
const bump = require('gulp-bump');
|
const bump = require('gulp-bump');
|
||||||
@ -123,7 +124,7 @@ gulp.task('scss', function () {
|
|||||||
*/
|
*/
|
||||||
gulp.task('js', function () {
|
gulp.task('js', function () {
|
||||||
return gulp.src(assets.js.src)
|
return gulp.src(assets.js.src)
|
||||||
.pipe(webpack(require('./webpack.config.js')))
|
.pipe(webpackStream(require('./webpack.config.js'), webpack))
|
||||||
.pipe(gulp.dest(assets.js.dest))
|
.pipe(gulp.dest(assets.js.dest))
|
||||||
.on('error', handleError);
|
.on('error', handleError);
|
||||||
});
|
});
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
"winston": "^2.4.0"
|
"winston": "^2.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.0.0-beta.31",
|
"babel-core": "^6.26.3",
|
||||||
"@babel/preset-env": "^7.0.0-beta.31",
|
"babel-loader": "^7.1.4",
|
||||||
"@babel/preset-es2015": "^7.0.0-beta.32",
|
"babel-minify-webpack-plugin": "^0.3.1",
|
||||||
"babel-loader": "^8.0.0-beta.0",
|
"babel-preset-env": "^1.7.0",
|
||||||
"backbone": "1.3.3",
|
"backbone": "1.3.3",
|
||||||
"backbone-virtual-collection": "^0.6.15",
|
"backbone-virtual-collection": "^0.6.15",
|
||||||
"backbone.marionette": "3.4.1",
|
"backbone.marionette": "3.4.1",
|
||||||
@ -47,7 +47,8 @@
|
|||||||
"prepack-webpack-plugin": "^1.1.0",
|
"prepack-webpack-plugin": "^1.1.0",
|
||||||
"run-sequence": "^2.2.0",
|
"run-sequence": "^2.2.0",
|
||||||
"underscore": "^1.8.3",
|
"underscore": "^1.8.3",
|
||||||
"webpack": "^3.8.1",
|
"webpack": "^4.12.0",
|
||||||
|
"webpack-cli": "^3.0.8",
|
||||||
"webpack-stream": "^4.0.0",
|
"webpack-stream": "^4.0.0",
|
||||||
"webpack-visualizer-plugin": "^0.1.11"
|
"webpack-visualizer-plugin": "^0.1.11"
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,33 @@
|
|||||||
|
const path = require('path');
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const Visualizer = require('webpack-visualizer-plugin');
|
const Visualizer = require('webpack-visualizer-plugin');
|
||||||
|
|
||||||
module.exports = {
|
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',
|
context: __dirname + '/src/frontend/js',
|
||||||
entry: './main.js',
|
entry: './main.js',
|
||||||
output: {
|
output: {
|
||||||
@ -15,7 +41,7 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
exclude: /(node_modules|bower_components)/,
|
exclude: /(node_modules|bower_components)/,
|
||||||
loader: 'babel-loader',
|
loader: 'babel-loader'//,
|
||||||
query: {
|
query: {
|
||||||
presets: ['@babel/es2015']
|
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: [
|
plugins: [
|
||||||
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
|
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
|
||||||
new webpack.optimize.LimitChunkCountPlugin({
|
new webpack.optimize.LimitChunkCountPlugin({
|
||||||
@ -49,4 +91,5 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user