Skip to content

Staging config is not used #1696

@nozpheratu

Description

@nozpheratu

Using v3.5.5, I defined a new staging environment, in config/webpacker.yml I have:

staging:
  <<: *default
  compile: false
  cache_manifest: true

I also have the following in config/webpack/staging.js:

const environment = require('./environment');
const webpack = require('webpack');

environment.plugins.append(
  'DefineGlobals',
  new webpack.DefinePlugin({
    API_HOST: JSON.stringify('https://example.com'),
  }),
);

module.exports = environment.toWebpackConfig();

This staging.js config does not seem to get incorporated into my pack at all when I built using RAILS_ENV=staging NODE_ENV=staging bundle exec rails assets:precompile, one of my packs utilizes this environment-specific variable.

Regardless of whether NODE_ENV is set to production or staging, in any case it seems to be using the settings in config/webpack/production.js rather than config/webpack/staging.js.

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