mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-12-04 14:37:19 -05:00
upgrade minimum nodejs version, yarn dev deps
Looks like I basically had to do this to keep up. With nodejs version 12 (current LTS), the version of fsevents I installed wouldn't build. A "yarn upgrade" by itself resulted in a new problem as described in #69. Conversely, the new versions don't install with nodejs 8. So I bit the bullet and upgraded all the dev dependency stuff and the nodejs at once. nodejs 10 seems capable of running either the old or new, fwiw. I'm a little sad that this seems to have made the UI bundle 5% larger. Before, "yarn build" said 350 KiB. After, 369 KiB. A little bit in several places. For example, jquery-ui.bundle.js went from 156 KiB (in 2 chunks) to 160 KiB (in 1 chunk) for some reason.
This commit is contained in:
@@ -49,10 +49,17 @@ module.exports = {
|
||||
test: /\.js$/,
|
||||
loader: 'babel-loader',
|
||||
query: {
|
||||
presets: ['env', {modules: false}],
|
||||
presets: [
|
||||
['@babel/preset-env', {
|
||||
targets: {
|
||||
esmodules: true,
|
||||
},
|
||||
modules: false
|
||||
}]
|
||||
],
|
||||
},
|
||||
exclude: /(node_modules|bower_components)/,
|
||||
include: ['./ui-src'],
|
||||
include: [path.resolve('./ui-src')],
|
||||
},
|
||||
{
|
||||
test: /\.png$/,
|
||||
|
||||
@@ -35,7 +35,7 @@ const CompressionPlugin = require('compression-webpack-plugin');
|
||||
const baseConfig = require('./base.config.js');
|
||||
const merge = require('webpack-merge');
|
||||
|
||||
const CleanWebpackPlugin = require('clean-webpack-plugin');
|
||||
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||||
|
||||
module.exports = (env, args) => {
|
||||
return merge(baseConfig, {
|
||||
@@ -88,7 +88,7 @@ module.exports = (env, args) => {
|
||||
plugins: [
|
||||
new CleanWebpackPlugin(),
|
||||
new CompressionPlugin({
|
||||
asset: '[path].gz[query]',
|
||||
filename: '[path].gz[query]',
|
||||
algorithm: 'gzip',
|
||||
test: /\.js$|\.css$|\.html$/,
|
||||
threshold: 10240,
|
||||
|
||||
Reference in New Issue
Block a user