Skip to content

Copy files without entries? #1140

@CapInSpase

Description

@CapInSpase

Hi, I want to copy static files into a separate command, but I get an error when executing

No entries found! You must call addEntry() or addEntries() or addStyleEntry() or copyFiles() at least once - otherwise... there is nothing to webpack!

//config for copy static files

Encore
    .setOutputPath('public/assets/')
    .setPublicPath('/assetic')
    .setManifestKeyPrefix('assetic/')

    .disableSingleRuntimeChunk()
    .cleanupOutputBeforeBuild()
    .enableBuildNotifications()

    .addPlugin(new CopyWebpackPlugin({
        patterns: [
            { from: './assets/sites', to: '../sites', info: { minimized: true } },
            { from: './assets/bundles', to: '../bundles', info: { minimized: true } },
            { from: './assets/vendor', to: 'vendor', info: { minimized: true } },
        ]
    }))
;
const copyStaticConfig = Encore.getWebpackConfig();
copyStaticConfig.name = 'copyStaticConfig';
Encore.reset();

module.exports = [copyStaticConfig];

If use copyFiles() how to set multiply path and not minimized?
https://symfonycasts.com/screencast/webpack-encore/copy-files

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