nikushi / minipack

Minipack, a gem for minimalists, which can integrates Rails with webpack. It is an alternative to Webpacker.
MIT License
115 stars 22 forks source link

manifest.json written to wrong path #30

Closed anitagraham closed 4 years ago

anitagraham commented 4 years ago

Hi,

my Minipack.config looks like this:

Minipack.configuration do |c|
  c.cache = !Rails.env.development?
  c. manifest = Rails.root.join('public', 'assets', 'manifest.json')
  c.extract_css = false # not emitting css yet.
end

but my manifest file ends up in public/javascripts/, which is the destination path for my webpack build. I've been working around this in development mode, but I want to build for production now.

Any clues on what is happening?

Anita Graham

jochamb commented 4 years ago

the c.manifest option is defining where minipack should read the generated webpack manifest from.

For example, in order for minipack to read the manifest with your current setup, it should be

c. manifest = Rails.root.join('public', 'javascripts', 'manifest.json')

nikushi commented 4 years ago

Thank you @Jukejc :)