Skip to content

Commit

Permalink
hotfix: revert feat additions
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed May 11, 2021
1 parent cd1fc62 commit fc5fb58
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 180 deletions.
1 change: 0 additions & 1 deletion packages/config/src/config/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export default () => ({
fallback: '200.html',
crawler: true,
manifest: true,
nojekyll: true,
cache: {
ignore: [],
globbyOptions: {
Expand Down
1 change: 0 additions & 1 deletion packages/config/test/__snapshots__/options.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ Object {
"fallback": "200.html",
"interval": 0,
"manifest": true,
"nojekyll": true,
"routes": Array [],
"staticAssets": Object {
"base": "/_nuxt/static",
Expand Down
2 changes: 0 additions & 2 deletions packages/config/test/config/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ Object {
"fallback": "200.html",
"interval": 0,
"manifest": true,
"nojekyll": true,
"routes": Array [],
"staticAssets": Object {
"base": undefined,
Expand Down Expand Up @@ -585,7 +584,6 @@ Object {
"fallback": "200.html",
"interval": 0,
"manifest": true,
"nojekyll": true,
"routes": Array [],
"staticAssets": Object {
"base": undefined,
Expand Down
6 changes: 2 additions & 4 deletions packages/generator/src/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,8 @@ export default class Generator {

// Add .nojekyll file to let GitHub Pages add the _nuxt/ folder
// https://help.github.com/articles/files-that-start-with-an-underscore-are-missing/
if (this.options.generate.nojekyll) {
const nojekyllPath = path.resolve(this.distPath, '.nojekyll')
await fsExtra.writeFile(nojekyllPath, '')
}
const nojekyllPath = path.resolve(this.distPath, '.nojekyll')
await fsExtra.writeFile(nojekyllPath, '')

await this.nuxt.callHook('generate:distCopied', this)
await this.nuxt.callHook('export:distCopied', this)
Expand Down
1 change: 0 additions & 1 deletion packages/generator/test/generator.init.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ describe('generator: initialize', () => {
test('should initialize destination folder', async () => {
const nuxt = createNuxt()
nuxt.options.generate.fallback = 'fallback.html'
nuxt.options.generate.nojekyll = true
const generator = new Generator(nuxt)
fsExtra.exists.mockReturnValueOnce(false)

Expand Down
1 change: 0 additions & 1 deletion packages/types/config/generate.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export interface NuxtOptionsGenerate {
exclude?: RegExp[]
fallback?: string | boolean
interval?: number
nojekyll?: boolean
routes?: NuxtOptionsGenerateRoute[] | NuxtOptionsGenerateRoutesFunction | NuxtOptionsGenerateRoutesFunctionWithCallback
subFolders?: boolean
cache?: false | {
Expand Down
39 changes: 2 additions & 37 deletions packages/types/config/module.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

import { Configuration as WebpackConfiguration } from 'webpack'
import { NuxtOptionsLoaders } from './build'
import { NuxtRouteConfig } from './router'
import { NuxtOptionsServerMiddleware } from './server-middleware'
import { NuxtOptions } from '.'

interface ExtendFunctionContext {
Expand All @@ -19,43 +17,10 @@ interface ExtendFunctionContext {
loaders: NuxtOptionsLoaders
}

export interface ModuleTemplateConfig {
src: string,
fileName?: string
filename?: string
options?: Record<string, any>
[key: string]: any
}

export interface ModulePluginTemplateConfig extends ModuleTemplateConfig {
ssr?: boolean
mode?: 'all' | 'client' | 'server'
}

export interface ModuleTemplateDest {
src: string
dst: string
options?: Record<string, any>
}

export type ModuleTemplate = ModuleTemplateConfig | string
export type ModulePluginTemplate = ModulePluginTemplateConfig | string

type ExtendRoutesFunction = (routes: NuxtRouteConfig[], resolve: (...pathSegments: string[]) => string) => void
type ExtendBuildFunction = (config: WebpackConfiguration, ctx: ExtendFunctionContext) => void
type ExtendFunction = (config: WebpackConfiguration, ctx: ExtendFunctionContext) => void

interface ModuleThis {
addTemplate(template: ModuleTemplate): ModuleTemplateDest
addPlugin(template: ModulePluginTemplate): void
addLayout(template: ModuleTemplate, name?: string): void
addErrorLayout (dst: string): void
addServerMiddleware (middleware: NuxtOptionsServerMiddleware): void
extendBuild(fn: ExtendBuildFunction): void
extendRoutes(fn: ExtendRoutesFunction): void
// eslint-disable-next-line no-use-before-define
requireModule (moduleOpts: NuxtOptionsModule, paths?: string[]): Promise<any>
// eslint-disable-next-line no-use-before-define
addModule (moduleOpts: NuxtOptionsModule, paths?: string[]): Promise<any>
extendBuild(fn: ExtendFunction): void
options: NuxtOptions
nuxt: any // TBD
[key: string]: any // TBD
Expand Down
1 change: 0 additions & 1 deletion packages/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"vue-loader": "^15.9.7",
"vue-style-loader": "^4.1.3",
"vue-template-compiler": "^2.6.12",
"watchpack": "^2.1.1",
"webpack": "^4.46.0",
"webpack-bundle-analyzer": "^4.4.1",
"webpack-dev-middleware": "^4.2.0",
Expand Down
3 changes: 0 additions & 3 deletions packages/webpack/src/config/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { TARGETS, isUrl, urlJoin, getPKG, tryResolve, requireModule, resolveModu
import PerfLoader from '../utils/perf-loader'
import StyleLoader from '../utils/style-loader'
import WarningIgnorePlugin from '../plugins/warning-ignore'
import { Watchpack2Plugin } from '../plugins/watchpack'
import { reservedVueTags } from '../utils/reserved-tags'

export default class WebpackBaseConfig {
Expand Down Expand Up @@ -479,8 +478,6 @@ export default class WebpackBaseConfig {
}))
}

plugins.push(new Watchpack2Plugin())

return plugins
}

Expand Down
116 changes: 0 additions & 116 deletions packages/webpack/src/plugins/watchpack.js

This file was deleted.

13 changes: 0 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6552,11 +6552,6 @@ glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@^5.1.1, glob-parent@~5.1.0:
dependencies:
is-glob "^4.0.1"

glob-to-regexp@^0.4.1:
version "0.4.1"
resolved "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e"
integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==

[email protected]:
version "7.1.6"
resolved "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
Expand Down Expand Up @@ -13358,14 +13353,6 @@ watchpack@^1.7.4:
chokidar "^3.4.1"
watchpack-chokidar2 "^2.0.1"

watchpack@^2.1.1:
version "2.1.1"
resolved "https://registry.npmjs.org/watchpack/-/watchpack-2.1.1.tgz#e99630550fca07df9f90a06056987baa40a689c7"
integrity sha512-Oo7LXCmc1eE1AjyuSBmtC3+Wy4HcV8PxWh2kP6fOl8yTlNS7r0K9l1ao2lrrUza7V39Y3D/BbJgY8VeSlc5JKw==
dependencies:
glob-to-regexp "^0.4.1"
graceful-fs "^4.1.2"

wcwidth@^1.0.0:
version "1.0.1"
resolved "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8"
Expand Down

0 comments on commit fc5fb58

Please sign in to comment.