Skip to content

By default Webpacker does not use config/webpack/test.js when running tests #2654

Closed
@ghost

Description

It is unintuitive to me that webpacker does not use config/webpack/test.js by default when doing rails test or rspec.

I have a small proof of concept minimal rails app with only the default rails gems + rspec, a single generated controller, and a "throw" statement in each environment. rails test:system shows that development.js is run by default.
https://github.com/alan-pie/env-test

If this is intended, what is the right way to use "test.js"? Should I always specify NODE_ENV manually on the command line if I want the test configuration? Is this documented anywhere?

Metadata

Metadata

Assignees

No one assigned

    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