Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: do not run assets bundler when explicitely disabled in rc file #4429

Merged
merged 1 commit into from
Feb 24, 2024

Conversation

Julien-R44
Copy link
Member

Users can now totally disable the assets bundler logic integrated in the assembler, and this from the RCFile :

// adonisrc.ts
export default defineConfig({
  // Disable assembler built-in assets bundler
  assetsBundler: false, 
  
  assembler: {
    onDevServerStarting: [
      // Let @adonisjs/vite manage the assets bundling itself
      () => import('@adonisjs/vite/build_hook')
    ]
  }
})

This is useful in our case, because with the next Vite integration, adonisjs/vite itself will launch the vite dev server

One thing to note : It's weird to set assetsBundler to false when you want to use Vite. It's not logical at all for users who don't know about internals of Adonis. But for the moment, we don't have much choice. Later, if our new Vite integration is successful, we should be able to remove all asset bundling logic from the Assembler. And also, we should be able to remove this assetsBundler configuration property from the RC File.

@Julien-R44 Julien-R44 merged commit be6ca03 into develop Feb 24, 2024
12 checks passed
@Julien-R44 Julien-R44 deleted the feat/disable-assets-bundler branch February 24, 2024 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant