Skip to content

Change manifest path dynamically (both rails and npm package) #467

Answered by tomdracz
h0jeZvgoxFepBQ2C asked this question in Q&A
Discussion options

You must be logged in to vote

By default, you can set manifest path per environment in the shakapacker.yml

# Location for manifest.json, defaults to {public_output_path}/manifest.json if unset
# manifest_path: public/packs/manifest.json
- Only that is supported easily.

If you want to amend the output path for NPM package further, you would have to play around with the webpack config, example below how to amend the manifest output path:

const { generateWebpackConfig } = require('shakapacker');
const path = require('path');

const customConfig = {
  resolve: {
    extensions: ['.css', 'js'],
  },
};

const generatedConfig = ge…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@h0jeZvgoxFepBQ2C
Comment options

Answer selected by h0jeZvgoxFepBQ2C
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants