提交 7194bfc6 编写于 作者: G Guy Bedford 提交者: Joe Haddad

string-hash, strip-ansi

上级 caa5da7c
import chalk from 'next/dist/compiled/chalk'
import textTable from 'next/dist/compiled/text-table'
import createStore from 'next/dist/compiled/unistore'
import stripAnsi from 'strip-ansi'
import stripAnsi from 'next/dist/compiled/strip-ansi'
import formatWebpackMessages from '../../client/dev/error-overlay/format-webpack-messages'
import { OutputState, store as consoleStore } from './store'
......
import createStore from 'next/dist/compiled/unistore'
import stripAnsi from 'strip-ansi'
import stripAnsi from 'next/dist/compiled/strip-ansi'
import * as Log from './log'
......
import babelLoader from 'next/dist/compiled/babel-loader'
import { basename, join } from 'path'
import hash from 'string-hash'
import hash from 'next/dist/compiled/string-hash'
// increment 'j' to invalidate cache
// eslint-disable-next-line no-useless-concat
......
import { loader } from 'webpack'
import hash from 'string-hash'
import hash from 'next/dist/compiled/string-hash'
import { basename } from 'path'
const nextDataLoader: loader.Loader = function(source) {
const filename = this.resourcePath
......
/* eslint-disable
no-param-reassign
*/
import stringHash from 'string-hash'
import stringHash from 'next/dist/compiled/string-hash'
import { SourceMapConsumer } from 'next/dist/compiled/source-map'
import { SourceMapSource, RawSource } from 'webpack-sources'
import { RequestShortener } from 'webpack'
......
......@@ -85,8 +85,6 @@
"react-is": "16.8.6",
"resolve-url-loader": "3.1.1",
"sass-loader": "8.0.2",
"string-hash": "1.1.3",
"strip-ansi": "5.2.0",
"style-loader": "1.0.0",
"styled-jsx": "3.2.5",
"terser": "4.4.2",
......@@ -195,6 +193,8 @@
"resolve": "1.11.0",
"send": "0.17.1",
"source-map": "0.6.1",
"string-hash": "1.1.3",
"strip-ansi": "5.2.0",
"taskr": "1.1.0",
"text-table": "0.2.0",
"typescript": "3.7.3",
......
......@@ -517,6 +517,20 @@ export async function ncc_source_map(task, opts) {
.target('dist/compiled/source-map')
}
// eslint-disable-next-line camelcase
export async function ncc_string_hash(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('string-hash')))
.ncc({ packageName: 'string-hash' })
.target('dist/compiled/string-hash')
}
// eslint-disable-next-line camelcase
export async function ncc_strip_ansi(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('strip-ansi')))
.ncc({ packageName: 'strip-ansi' })
.target('dist/compiled/strip-ansi')
}
// eslint-disable-next-line camelcase
export async function ncc_text_table(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('text-table')))
......@@ -587,6 +601,8 @@ export async function precompile(task) {
'ncc_resolve',
'ncc_send',
'ncc_source_map',
'ncc_string_hash',
'ncc_strip_ansi',
'ncc_text_table',
'ncc_unistore',
])
......
......@@ -168,6 +168,14 @@ declare module 'next/dist/compiled/source-map' {
import m from 'source-map'
export = m
}
declare module 'next/dist/compiled/string-hash' {
import m from 'string-hash'
export = m
}
declare module 'next/dist/compiled/strip-ansi' {
import m from 'strip-ansi'
export = m
}
declare module 'next/dist/compiled/text-table' {
function textTable(
rows: Array<Array<{}>>,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册