Skip to content

How to manually add entries to manifest.json? #140

Closed
@havvg

Description

@havvg

Hi there,

I've got somewhat legacy (huge dumped JS arrays) code. Without Encore I can do this:

new ConcatPlugin({
    uglify: true,
    useHash: true,
    sourceMap: false,
    fileName: 'shipdev-data.js',
    filesToConcat: ['./frontend/shipdev/data/modules.js', './frontend/shipdev/data/ships.js']
})

I would like to keep it this way for now, because it works. I tried using addEntry but this runs for ages (I cancelled after 10minutes). Now using Encore, I am adding this:

addPlugin(new ConcatPlugin({
    uglify: true,
    useHash: true,
    sourceMap: false,
    fileName: 'shipdev-data.js',
    filesToConcat: ['./frontend/shipdev/data/modules.js', './frontend/shipdev/data/ships.js']
}))

Which works fine to the point that the file is available and contains the content as it should. Now I would like to have this entry being added to the manifest.json. Is there an elegant way with Encore?

My current workaround is just defining useHash: false, which works for asset('shipdev-data.js') with framework.assets.base_path configured.

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