Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit fe1920b

Browse files
committed
Fix bundler
1 parent 2517649 commit fe1920b

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

bundler/mod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export class Bundler {
141141
return bundlingFile
142142
}
143143

144-
const source = await this.#app.resolveModule(mod.url)
144+
const source = await this.#app.readModule(mod.url)
145145
if (source === null) {
146146
throw new Error(`Unsupported module '${mod.url}'`)
147147
}

server/app.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,16 +163,16 @@ export class Application implements ServerApplication {
163163
const alephPkgUri = getAlephPkgUri()
164164
const buildManifestFile = join(this.buildDir, 'build.manifest.json')
165165
const plugins = computeHash(JSON.stringify({
166-
plugins: this.config.plugins.filter(isLoaderPlugin).map(({ name }) => name),
166+
plugins: this.config.plugins.map(({ name }) => name),
167167
css: {
168168
modules: this.config.css.modules,
169-
postcss: this.config.css.postcss.plugins.map(p => {
169+
postcssPlugins: this.config.css.postcss?.plugins.map(p => {
170170
if (util.isString(p)) {
171171
return p
172172
} else if (util.isArray(p)) {
173-
return p[0] + JSON.stringify(p[1])
173+
return p[0]
174174
} else {
175-
p.toString()
175+
return 'Plugin'
176176
}
177177
})
178178
},

server/config.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ import type { Config, CSSOptions, PostCSSPlugin } from '../types.ts'
99
import { VERSION } from '../version.ts'
1010
import { getAlephPkgUri, reLocaleID } from './helper.ts'
1111

12-
export interface RequiredConfig extends Required<Omit<Config, 'css'>> {
13-
react: ReactResolve,
14-
css: Required<CSSOptions>
12+
export interface RequiredConfig extends Required<Config> {
13+
react: ReactResolve
1514
}
1615

1716
export const defaultConfig: Readonly<RequiredConfig> = {

0 commit comments

Comments
 (0)