Revert "upgrade to webpack5 (#3871)" (#3907)

This reverts commit e1e0eeac56d32d88ca56d28b3da10c5b68f10cfe.
This commit is contained in:
Nikhil 2021-06-02 07:04:40 -07:00 committed by GitHub
parent dbed9262c0
commit a40867d544
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 29 additions and 8650 deletions

2
.gitignore vendored
View File

@ -39,3 +39,5 @@ npm-debug.log
# karma reports # karma reports
report.*.json report.*.json
package-lock.json

10
app.js
View File

@ -7,14 +7,6 @@
* node app.js [options] * node app.js [options]
*/ */
class WatchRunPlugin {
apply(compiler) {
compiler.hooks.emit.tapAsync('WatchRunPlugin', (compilation, callback) => {
console.log('Begin compile at ' + new Date());
callback();
});
}
}
const options = require('minimist')(process.argv.slice(2)); const options = require('minimist')(process.argv.slice(2));
const express = require('express'); const express = require('express');
@ -51,7 +43,7 @@ app.use('/proxyUrl', function proxyRequest(req, res, next) {
const webpack = require('webpack'); const webpack = require('webpack');
const webpackConfig = require('./webpack.config.js'); const webpackConfig = require('./webpack.config.js');
webpackConfig.plugins.push(new webpack.HotModuleReplacementPlugin()); webpackConfig.plugins.push(new webpack.HotModuleReplacementPlugin());
webpackConfig.plugins.push(new WatchRunPlugin()); webpackConfig.plugins.push(function() { this.plugin('watch-run', function(watching, callback) { console.log('Begin compile at ' + new Date()); callback(); }) });
webpackConfig.entry.openmct = [ webpackConfig.entry.openmct = [
'webpack-hot-middleware/client?reload=true', 'webpack-hot-middleware/client?reload=true',

8613
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@
"babel-eslint": "10.0.3", "babel-eslint": "10.0.3",
"comma-separated-values": "^3.6.4", "comma-separated-values": "^3.6.4",
"concurrently": "^3.6.1", "concurrently": "^3.6.1",
"copy-webpack-plugin": "^9.0.0", "copy-webpack-plugin": "^4.5.2",
"cross-env": "^6.0.3", "cross-env": "^6.0.3",
"css-loader": "^1.0.0", "css-loader": "^1.0.0",
"d3-array": "1.2.x", "d3-array": "1.2.x",
@ -41,19 +41,19 @@
"jsdoc": "^3.3.2", "jsdoc": "^3.3.2",
"karma": "5.1.1", "karma": "5.1.1",
"karma-chrome-launcher": "3.1.0", "karma-chrome-launcher": "3.1.0",
"karma-firefox-launcher": "1.3.0",
"karma-cli": "2.0.0", "karma-cli": "2.0.0",
"karma-coverage": "2.0.3", "karma-coverage": "2.0.3",
"karma-coverage-istanbul-reporter": "3.0.3", "karma-coverage-istanbul-reporter": "3.0.3",
"karma-firefox-launcher": "1.3.0",
"karma-html-reporter": "0.2.7", "karma-html-reporter": "0.2.7",
"karma-jasmine": "3.3.1", "karma-jasmine": "3.3.1",
"karma-sourcemap-loader": "0.3.7", "karma-sourcemap-loader": "0.3.7",
"karma-webpack": "^5.0.0", "karma-webpack": "4.0.2",
"location-bar": "^3.0.1", "location-bar": "^3.0.1",
"lodash": "^4.17.12", "lodash": "^4.17.12",
"markdown-toc": "^0.11.7", "markdown-toc": "^0.11.7",
"marked": "^0.3.5", "marked": "^0.3.5",
"mini-css-extract-plugin": "^1.6.0", "mini-css-extract-plugin": "^0.4.1",
"minimist": "^1.2.5", "minimist": "^1.2.5",
"moment": "2.25.3", "moment": "2.25.3",
"moment-duration-format": "^2.2.2", "moment-duration-format": "^2.2.2",
@ -69,10 +69,10 @@
"uuid": "^3.3.3", "uuid": "^3.3.3",
"v8-compile-cache": "^1.1.0", "v8-compile-cache": "^1.1.0",
"vue": "2.5.6", "vue": "2.5.6",
"vue-loader": "^15.9.7", "vue-loader": "^15.2.6",
"vue-template-compiler": "2.5.6", "vue-template-compiler": "2.5.6",
"webpack": "^5.37.0", "webpack": "^4.16.2",
"webpack-cli": "^3.3.12", "webpack-cli": "^3.1.0",
"webpack-dev-middleware": "^3.1.3", "webpack-dev-middleware": "^3.1.3",
"webpack-hot-middleware": "^2.22.3", "webpack-hot-middleware": "^2.22.3",
"zepto": "^1.2.0" "zepto": "^1.2.0"

View File

@ -43,6 +43,7 @@ import {TRIGGER_CONJUNCTION, TRIGGER_LABEL} from "./utils/constants";
* } * }
*/ */
export default class Condition extends EventEmitter { export default class Condition extends EventEmitter {
/** /**
* Manages criteria and emits the result of - true or false - based on criteria evaluated. * Manages criteria and emits the result of - true or false - based on criteria evaluated.
* @constructor * @constructor

View File

@ -70,7 +70,7 @@ describe("the plugin", () => {
setTimeout(() => { setTimeout(() => {
expect(window.location.href).toContain('context.html#/browse/?tc.mode=fixed&tc.startBound=0&tc.endBound=1&tc.timeSystem=utc'); expect(window.location.href).toContain('context.html#/browse/?tc.mode=fixed&tc.startBound=0&tc.endBound=1&tc.timeSystem=utc');
done(); done();
}, 2500); }, 1500);
}); });
}); });
}); });

View File

@ -64,27 +64,21 @@ const webpackConfig = {
filename: '[name].css', filename: '[name].css',
chunkFilename: '[name].css' chunkFilename: '[name].css'
}), }),
new CopyWebpackPlugin({ new CopyWebpackPlugin([
patterns: [ {
{ from: 'src/images/favicons',
from: 'src/images/favicons', to: 'favicons'
to: 'favicons' },
}, {
{ from: './index.html',
from: './index.html', transform: function (content) {
transform: function (content) { return content.toString().replace(/dist\//g, '');
return content.toString().replace(/dist\//g, '');
}
} }
] }
}) ])
], ],
module: { module: {
rules: [ rules: [
{
test: /\.vue$/,
use: 'vue-loader'
},
{ {
test: /\.(sc|sa|c)ss$/, test: /\.(sc|sa|c)ss$/,
use: [ use: [
@ -124,14 +118,17 @@ const webpackConfig = {
} }
} }
}, },
{
test: /\.vue$/,
use: 'vue-loader'
}
] ]
}, },
ignoreWarnings: [/asset size limit/g],
stats: { stats: {
modules: false, modules: false,
timings: true, timings: true,
colors: true colors: true,
warningsFilter: /asset size limit/g
} }
}; };