Skip to content

workflow build fails with "No loader is configured for .md files" with aliased paths #724

Closed

Description

@gdaybrice

After upgrading to the latest version of workflow (specifically following the changes in PR 705), the workflow build fails during the "Discovering workflow directives" phase if a scanned TypeScript file imports a Markdown (.md) file with an aliased path.

This is the turbopack config in next.config.js that used to work before beta.40

  turbopack: {
    rules: {
      '*.md': {
        loaders: ['raw-loader'],
        as: '*.js',
      },
    },
  },

Environment
Workflow Version: 4.0.1-beta.41
Next.js Version: 15.x / 16.x
Package Manager: bun
OS: macOS (Darwin 24.6.0)

Activity

  1. changed the title [-]workflow build fails with "No loader is configured for .md files"[/-] [+]workflow build fails with "No loader is configured for .md files" with aliased paths[/+] on Jan 4, 2026
  2. pranaygp commented on Jan 12, 2026

    @pranaygp
    Contributor

    fyi @ijjk for vis

  3. ijjk commented on Jan 12, 2026

    @ijjk
    Member

    Hi, could you provide a link to minimal reproduction that was working before and isn't anymore?

  4. gdaybrice commented on Jan 12, 2026

    @gdaybrice
    ContributorAuthor

    next.config.ts

    import type { NextConfig } from 'next';
    import { withWorkflow } from 'workflow/next';
    
    const config: NextConfig = {
      poweredByHeader: false,
      devIndicators: false,
      experimental: {
        turbopackFileSystemCacheForDev: true,
        authInterrupts: true,
      },
      turbopack: {
        rules: {
          '*.md': {
            loaders: ['raw-loader'],
            as: '*.js',
          },
        },
      },
    };
    
    export default withWorkflow(config);

    markdown.d.ts

    declare module '*.md' {
      const content: string;
      export default content;
    }

    and simply import an md file with an absolute path from within your code (e.g. import prompt from '@/ai/prompts/prompt.md';)

  5. ijjk commented on Jan 12, 2026

    @ijjk
    Member

    A link to a repo with this setup would be great!

  6. gdaybrice commented on Jan 13, 2026

    @gdaybrice
    ContributorAuthor
  7. gdaybrice commented on Jan 23, 2026

    @gdaybrice
    ContributorAuthor

    I've simplified the approach on my PR (#766) can this be looked at please?

  8. NathanColosimo commented on Jul 15, 2026

    @NathanColosimo
    Contributor

    Should be fixed in #2546 @gdaybrice let us know if you're having any other issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions