Skip to content

Commit

Permalink
fix: indicator/hmr errors (#1248)
Browse files Browse the repository at this point in the history
* fix: whm error handling (browser)

* overlay: styles

* fix: multicompiler

* update publicPath test
  • Loading branch information
kellymears committed Mar 22, 2022
1 parent 5aa04cc commit c6a50b6
Show file tree
Hide file tree
Showing 32 changed files with 874 additions and 489 deletions.
1 change: 1 addition & 0 deletions sources/@roots/bud-api/src/api/facade/facade.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ export class Facade {
* @public
*/
public entry: entryFacade

/**
* Generate application entrypoints from source asset paths.
*
Expand Down
2 changes: 1 addition & 1 deletion sources/@roots/bud-api/src/api/methods/watch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface watch {
}

export const watch: watch = function (files, options = {}) {
const ctx = (this.root as Framework) ?? (this as Framework)
const ctx = this as Framework

files = Array.isArray(files) ? files : [files]

Expand Down
4 changes: 1 addition & 3 deletions sources/@roots/bud-build/src/Build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@ export class Build extends Framework.Service implements Framework.Build {

if (isUndefined(propValue)) return

Object.assign(this.config, {
[propKey]: propValue,
})
Object.assign(this.config, {[propKey]: propValue})
}

/**
Expand Down
6 changes: 4 additions & 2 deletions sources/@roots/bud-compiler/src/Compiler/compiler.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ export class Compiler extends Service implements Contract {
@bind
@once
public async compile() {
const config = await this.before()
const compiler = await this.invoke(config)
this.config = await this.before()
const compiler = await this.invoke(this.config)

this.app.timeEnd('bud')
this.app._hrdone = this.app._hrdiff()
Expand Down Expand Up @@ -131,7 +131,9 @@ export class Compiler extends Service implements Contract {
*/
await this.app.build.make()

// if (this.app.hasChildren == false)
this.config.push(this.app.build.config)

/**
* If there are {@link Framework.children} instances, iterate through
* them and add to `config`
Expand Down
8 changes: 1 addition & 7 deletions sources/@roots/bud-framework/src/Framework/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,7 @@ export abstract class Framework {
*
* @public
*/
public _server: Server.Service
public get server(): Server.Service {
return this.root._server
}
public set server(server: Server.Service) {
this.root._server = server
}
public server: Server.Service

/**
* Container service for holding configuration values
Expand Down
6 changes: 0 additions & 6 deletions sources/@roots/bud-framework/src/Store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,6 @@ export namespace Store {
* @public
*/
hashFormat: string

/**
* Initial webpack configuration values
*
* @public
*/
}

export interface Map
Expand Down
7 changes: 5 additions & 2 deletions sources/@roots/bud-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,13 @@
"@roots/bud-framework": "workspace:sources/@roots/bud-framework",
"@roots/bud-support": "workspace:sources/@roots/bud-support",
"@roots/container": "workspace:sources/@roots/container",
"ansi-html-community": "0.0.8",
"express": "^4.17.1",
"html-entities": "^2.1.0",
"http-proxy-middleware": "2.0.4",
"querystring": "^0.2.0",
"strip-ansi": "^6.0.0",
"tslib": "^2.3.1",
"webpack-dev-middleware": "5.3.1",
"webpack-hot-middleware": "^2.25.1"
"webpack-dev-middleware": "5.3.1"
}
}
Loading

0 comments on commit c6a50b6

Please sign in to comment.