mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
upgrade dep:
css-loader 0.28->3.5 del 4.1->5.1 eslint 5.18->6.8 eslint-config-airbnb 17.1->18.1 eslint-loader 2.1->4.0 file-loader 2.0->6.0 fs.extra 8.0->9.0 gulp 2.0->3.0 gulp-nunjucks 4.0->5.0 json-loader 0.5->Removed style-loader 0.23->1.1 uglifyjs-webpack-plugin 1.3->2.2 yargs 13.2->15.3 katex 0.10->0.11 react-monaco-editor 0.35->0.36 timeage-react 1.2->3.0 timeago.js 3.0->4.0 uuid 3.3->7.0
This commit is contained in:
1 parent
9cb68397b9
commit
f9468536de
55 files changed
+776
-1032
No files matched your search
@@ -37,12 +37,21 @@ export default function (env = {}) {
|
||||
return {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
...require(root('package.json')).babelForProject,
|
||||
...require(root('package.json')).babelForProject, // eslint-disable-line
|
||||
cacheDirectory,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function cssLoader() {
|
||||
return {
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
importLoaders: 1,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function postcssLoader() {
|
||||
return {
|
||||
loader: 'postcss-loader',
|
||||
@@ -64,9 +73,7 @@ export default function (env = {}) {
|
||||
function extractCssLoader() {
|
||||
return {
|
||||
loader: ExtractCssPlugin.loader,
|
||||
options: {
|
||||
publicPath: '/public/path/to/',
|
||||
},
|
||||
options: { publicPath: '/' },
|
||||
};
|
||||
}
|
||||
|
||||
@@ -127,12 +134,12 @@ export default function (env = {}) {
|
||||
},
|
||||
{
|
||||
test: /\.styl$/,
|
||||
use: [extractCssLoader(), 'css-loader?importLoaders=1', postcssLoader(), 'stylus-loader']
|
||||
use: [extractCssLoader(), cssLoader(), postcssLoader(), 'stylus-loader']
|
||||
,
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: [extractCssLoader(), 'css-loader?importLoaders=1', postcssLoader()]
|
||||
use: [extractCssLoader(), cssLoader(), postcssLoader()]
|
||||
,
|
||||
},
|
||||
],
|
||||
@@ -143,6 +150,8 @@ export default function (env = {}) {
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
new webpack.ProgressPlugin(),
|
||||
|
||||
new webpack.ProvidePlugin({
|
||||
$: 'jquery',
|
||||
jQuery: 'jquery',
|
||||
@@ -179,7 +188,7 @@ export default function (env = {}) {
|
||||
default: {
|
||||
preferPathResolver: 'webpack',
|
||||
use: [
|
||||
require('rupture')(),
|
||||
require('rupture')(), // eslint-disable-line global-require
|
||||
],
|
||||
import: [
|
||||
'~vj/common/common.inc.styl',
|
||||
@@ -215,7 +224,7 @@ export default function (env = {}) {
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
options: {
|
||||
context: root(),
|
||||
customInterpolateName: (url, name, options) => beautifyOutputUrl(url),
|
||||
customInterpolateName: (url) => beautifyOutputUrl(url),
|
||||
},
|
||||
}),
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ export default function touch(mtime) {
|
||||
return;
|
||||
}
|
||||
touchFile(file)
|
||||
.catch(err => this.emit('error', err))
|
||||
.catch((err) => this.emit('error', err))
|
||||
.then(() => {
|
||||
this.push(file);
|
||||
callback();
|
||||
|
||||
@@ -15,7 +15,7 @@ export default class StaticManifestPlugin {
|
||||
.map((asset) => {
|
||||
const { name } = asset;
|
||||
// Skip files listed in ignore
|
||||
if (_.some(this.ignore, ignorePattern => name.indexOf(ignorePattern) > -1)) {
|
||||
if (_.some(this.ignore, (ignorePattern) => name.indexOf(ignorePattern) > -1)) {
|
||||
return null;
|
||||
}
|
||||
// Skip calculating hash for names like ?xxxx
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ export default async function ({ watch, production }) {
|
||||
log(chalk.green('Finished: %s'), chalk.reset(name));
|
||||
taskList[uid] = false;
|
||||
|
||||
if (Object.values(taskList).filter(b => b).length === 0) {
|
||||
if (Object.values(taskList).filter((b) => b).length === 0) {
|
||||
if (watch) {
|
||||
gulpTasks.watch();
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import webpackConfig from './config/webpack';
|
||||
|
||||
export default function ({ watch, production }) {
|
||||
const compiler = webpack(webpackConfig({ watch, production }));
|
||||
compiler.apply(new webpack.ProgressPlugin());
|
||||
|
||||
function compilerCallback(err, stats) {
|
||||
if (err) {
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ from 'lodash';
|
||||
|
||||
export default function mapWebpackUrlPrefix(mapList) {
|
||||
const rules = mapList.map((mappingRule) => {
|
||||
const regex = mappingRule.prefix.split('/').map(s => _.escapeRegExp(s)).join('[\\/\\\\]');
|
||||
const regex = mappingRule.prefix.split('/').map((s) => _.escapeRegExp(s)).join('[\\/\\\\]');
|
||||
return {
|
||||
from: new RegExp(`^${regex}`, mappingRule.flag),
|
||||
to: mappingRule.replace,
|
||||
|
||||
Reference in new issue
Block a user