How to use the @symfony/webpack-encore.addPlugin function in @symfony/webpack-encore

To help you get started, we’ve selected a few @symfony/webpack-encore examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github chamilo / chamilo-lms / webpack.config.js View on Github external
themes.forEach(function (theme) {
    Encore.addStyleEntry('css/themes/' + theme + '/default', './assets/css/themes/' + theme + '/default.css');

    // Copy images from themes into public/build
    Encore.addPlugin(new CopyPlugin({
        patterns: [{
            from: 'assets/css/themes/' + theme + '/images',
            to: 'css/themes/' + theme + '/images'
        }]
    },
    ));
});
github bolt / core / webpack.config.js View on Github external
const WebpackBar = require('webpackbar');
const Encore = require('@symfony/webpack-encore');

Encore
  .addPlugin(
    new WebpackBar({
        profile: Encore.isProduction(),
        minimal: false,
    }),
  )

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

  .copyFiles({
    from: './assets/static',
  })

  .cleanupOutputBeforeBuild()
github Leafpub / leafpub / webpack.config.js View on Github external
'./node_modules/@claviska/jquery-selectable/jquery.selectable.js',
        './node_modules/lodash/lodash.min.js',
        './node_modules/slugify/index.js',
        './app/source/scripts/modules/leafpub.js',
        './app/source/scripts/modules/locater.js',
        './app/source/scripts/modules/reauthenticate.js',
        './app/source/scripts/modules/shared.js'
    ])

    .addStyleEntry('admin-toolbar', [
        './app/source/styles/admin-toolbar.scss'
    ])
;

if (Encore.isProduction()){
    Encore.addPlugin(prodMode);
    Encore.addPlugin(preCache);
}

var webPackConfig = Encore.getWebpackConfig();
webPackConfig.resolve.extensions.push('.json');
webPackConfig.resolve.extensions.push('.vue');

webPackConfig.resolve.alias = {
    "datatables.net": "datatables.net/js/jquery.dataTables.js",
    "datetime": 'datatables.net-plugins/sorting/datetime-moment.js',
    //'vue': 'vue/dist/vue.js',
    'vue$': 'vue/dist/vue.esm.js',
};

webPackConfig.watchOptions = {
    poll: true
github Leafpub / leafpub / webpack.config.js View on Github external
'./node_modules/lodash/lodash.min.js',
        './node_modules/slugify/index.js',
        './app/source/scripts/modules/leafpub.js',
        './app/source/scripts/modules/locater.js',
        './app/source/scripts/modules/reauthenticate.js',
        './app/source/scripts/modules/shared.js'
    ])

    .addStyleEntry('admin-toolbar', [
        './app/source/styles/admin-toolbar.scss'
    ])
;

if (Encore.isProduction()){
    Encore.addPlugin(prodMode);
    Encore.addPlugin(preCache);
}

var webPackConfig = Encore.getWebpackConfig();
webPackConfig.resolve.extensions.push('.json');
webPackConfig.resolve.extensions.push('.vue');

webPackConfig.resolve.alias = {
    "datatables.net": "datatables.net/js/jquery.dataTables.js",
    "datetime": 'datatables.net-plugins/sorting/datetime-moment.js',
    //'vue': 'vue/dist/vue.js',
    'vue$': 'vue/dist/vue.esm.js',
};

webPackConfig.watchOptions = {
    poll: true
};