webpack-plugin-serve
Version:
A Development Server in a Webpack Plugin
37 lines (30 loc) • 1.07 kB
JavaScript
/*
Copyright © 2018 Andrew Powell
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of this Source Code Form.
*/
/**
* @note This file exists merely as an easy reference for folks adding it to their configuration entries
*/
(() => {
/* eslint-disable global-require */
const { run } = require('./lib/client/client');
let hash = '<unknown>';
let options;
try {
options = ʎɐɹɔosǝʌɹǝs;
} catch (e) {
const { log } = require('./lib/client/log');
log.error(
'The entry for webpack-plugin-serve was included in your build, but it does not appear that the plugin was. Please check your configuration.'
);
}
try {
// eslint-disable-next-line camelcase
hash = __webpack_hash__;
} catch (e) {} // eslint-disable-line no-empty
run(hash, options);
})();