Skip to content

Commit

Permalink
fix: setting srcDir should also affect the default dir for components…
Browse files Browse the repository at this point in the history
… (discussion #113)
  • Loading branch information
ElMassimo committed Mar 30, 2022
1 parent e694034 commit d170b4d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/iles/src/node/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ function inferJSX (config: UserConfig) {
function appConfigDefaults (appConfig: AppConfig, userConfig: UserConfig, env: ConfigEnv): AppConfig {
const { root } = appConfig
const isDevelopment = env.mode === 'development'
const { drafts = isDevelopment, jsx = inferJSX(userConfig) } = userConfig
const { drafts = isDevelopment, jsx = inferJSX(userConfig), srcDir = 'src' } = userConfig

return {
debug: true,
Expand All @@ -208,7 +208,7 @@ function appConfigDefaults (appConfig: AppConfig, userConfig: UserConfig, env: C
configPath: resolve(root, 'iles.config.ts'),
assetsDir: 'assets',
pagesDir: 'pages',
srcDir: 'src',
srcDir,
outDir: 'dist',
layoutsDir: 'layouts',
tempDir: '.iles-ssg-temp',
Expand Down Expand Up @@ -253,6 +253,7 @@ function appConfigDefaults (appConfig: AppConfig, userConfig: UserConfig, env: C
dts: true,
extensions: ['vue', 'jsx', 'tsx', 'js', 'ts', 'mdx', 'svelte'],
include: [/\.vue$/, /\.vue\?vue/, /\.mdx?/],
dirs: `${srcDir}/components`,
resolvers: [
IlesComponentResolver,
IlesLayoutResolver(appConfig),
Expand Down

0 comments on commit d170b4d

Please sign in to comment.