How to use the @symfony/webpack-encore.isRuntimeEnvironmentConfigured 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 thecodingmachine / symfony-vuejs / sources / app / webpack.config.js View on Github external
let Encore = require('@symfony/webpack-encore');

// Manually configure the runtime environment if not already configured yet by the "encore" command.
// It's useful when you use tools that rely on webpack.config.js file.
if (!Encore.isRuntimeEnvironmentConfigured()) {
    Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
}

Encore
// directory where compiled assets will be stored
    .setOutputPath('public/build/')
    // public path used by the web server to access the output path
    .setPublicPath('/build')
    // only needed for CDN's or sub-directory deploy
    //.setManifestKeyPrefix('build/')

    /*
     * ENTRY CONFIG
     *
     * Add 1 entry for each "page" of your app
     * (including one that's included on every page - e.g. "app")
github symfony / recipes / symfony / webpack-encore-bundle / 1.0 / webpack.config.js View on Github external
var Encore = require('@symfony/webpack-encore');

// Manually configure the runtime environment if not already configured yet by the "encore" command.
// It's useful when you use tools that rely on webpack.config.js file.
if (!Encore.isRuntimeEnvironmentConfigured()) {
    Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
}

Encore
    // directory where compiled assets will be stored
    .setOutputPath('public/build/')
    // public path used by the web server to access the output path
    .setPublicPath('/build')
    // only needed for CDN's or sub-directory deploy
    //.setManifestKeyPrefix('build/')

    /*
     * ENTRY CONFIG
     *
     * Add 1 entry for each "page" of your app
     * (including one that's included on every page - e.g. "app")
github BeWelcome / rox / webpack.config.js View on Github external
const CKEditorWebpackPlugin = require('@ckeditor/ckeditor5-dev-webpack-plugin');
const {styles} = require('@ckeditor/ckeditor5-dev-utils');

let Encore = require('@symfony/webpack-encore');

// Manually configure the runtime environment if not already configured yet by the "encore" command.
// It's useful when you use tools that rely on webpack.config.js file.
if (!Encore.isRuntimeEnvironmentConfigured()) {
    Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
}

Encore
    // directory where compiled assets will be stored
    .setOutputPath('public/build/')
    // public path used by the web server to access the output path
    .setPublicPath('/build')
    .addPlugin(new CKEditorWebpackPlugin({
        language: 'en',
        additionalLanguages: 'all',
        outputDirectory: 'cktranslations',
        buildAllTranslationsToSeparateFiles: true
    }))
    .splitEntryChunks()
    .enableSingleRuntimeChunk()
github async-aws / aws / website / webpack.config.js View on Github external
var Encore = require('@symfony/webpack-encore');

// Manually configure the runtime environment if not already configured yet by the "encore" command.
// It's useful when you use tools that rely on webpack.config.js file.
if (!Encore.isRuntimeEnvironmentConfigured()) {
    Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
}

Encore
    // directory where compiled assets will be stored
    .setOutputPath('template/assets/')
    // public path used by the web server to access the output path
    .setPublicPath('/assets')
    .addEntry('app', './assets/script/main.js')

    .copyFiles({
        from: './assets/image',

        // if versioning is enabled, add the file hash too
        to: 'image/[path][name].[hash:8].[ext]',
github crf-devs / resop / webpack.config.js View on Github external
var Encore = require('@symfony/webpack-encore');
var path = require('path');
// Manually configure the runtime environment if not already configured yet by the "encore" command.
// It's useful when you use tools that rely on webpack.config.js file.
if (!Encore.isRuntimeEnvironmentConfigured()) {
  Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
}

Encore
  // directory where compiled assets will be stored
  .setOutputPath('public/build/')
  // public path used by the web server to access the output path
  .setPublicPath('/build')
  // only needed for CDN's or sub-directory deploy
  //.setManifestKeyPrefix('build/')

    // Images
    .copyFiles({
      from: './assets/img',
      to: 'images/[path][name].[hash:8].[ext]',
      pattern: /\.(png|jpg|jpeg|svg)$/
github unite-cms / unite-cms / src / Bundle / AdminBundle / Resources / assets / webpack.config.js View on Github external
const Encore = require('@symfony/webpack-encore');
//const MonacoEditorPlugin = require('monaco-editor-webpack-plugin');

// Manually configure the runtime environment if not already configured yet by the "encore" command.
// It's useful when you use tools that rely on webpack.config.js file.
if (!Encore.isRuntimeEnvironmentConfigured()) {
    Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
}

Encore.reset();

module.exports = {
    build(entries = []) {

        Encore
            .setOutputPath('public/build/')
            .setPublicPath('/build')
            .addEntry('unite', entries)
            .splitEntryChunks()
            .enableSingleRuntimeChunk()
            .cleanupOutputBeforeBuild()
            .enableBuildNotifications()
github forkcms / forkcms / webpack.config.js View on Github external
backendConfig.name = 'backendConfig'

// reset Encore to build the next config
Encore.reset()

//
// END BACKEND SETUP

// ===========================

// START FRONTEND CORE SETUP
//

// Manually configure the runtime environment if not already configured yet by the "encore" command.
// It's useful when you use tools that rely on webpack.config.js file.
if (!Encore.isRuntimeEnvironmentConfigured()) {
  // Set the runtime environment
  Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev')
}

Encore
  .setOutputPath('src/Frontend/Core/build/')
  .setPublicPath('/src/Frontend/Core/build')
  .setManifestKeyPrefix('src/Frontend/Core/build/')

  .addEntry('frontend', './src/Frontend/Core/Js/Frontend.js')
  .addStyleEntry('screen', './src/Frontend/Core/Layout/Sass/screen.scss')

  .cleanupOutputBeforeBuild()

  // will require an extra script tag for runtime.js
  // but, you probably want this, unless you're building a single-page app
github chloebrqt / mercure-demo / webpack.config.js View on Github external
var Encore = require('@symfony/webpack-encore');

// Manually configure the runtime environment if not already configured yet by the "encore" command.
// It's useful when you use tools that rely on webpack.config.js file.
if (!Encore.isRuntimeEnvironmentConfigured()) {
    Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
}

Encore
    // directory where compiled assets will be stored
    .setOutputPath('public/build/')
    // public path used by the web server to access the output path
    .setPublicPath('/build')
    // only needed for CDN's or sub-directory deploy
    //.setManifestKeyPrefix('build/')

    /*
     * ENTRY CONFIG
     *
     * Add 1 entry for each "page" of your app
     * (including one that's included on every page - e.g. "app")
github griidc / pelagos / webpack.config.js View on Github external
var Encore = require('@symfony/webpack-encore');
var arguments = require('yargs').argv;

// Manually configure the runtime environment if not already configured yet by the "encore" command.
// It's useful when you use tools that rely on webpack.config.js file.
if (!Encore.isRuntimeEnvironmentConfigured()) {
    Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
}

Encore
    // directory where compiled assets will be stored
    .setOutputPath('public/build/')

    // public path used by the web server to access the output path
    .setPublicPath(arguments.publicpath ? arguments.publicpath : '/build')

    // only needed for CDN's or sub-directory deploy
    .setManifestKeyPrefix('build/')

    // Enable Vue js
    .enableVueLoader(() => {}, {
        useJsx: true,
github Noelierx / GameHer / webpack.config.js View on Github external
var Encore = require('@symfony/webpack-encore');

// Manually configure the runtime environment if not already configured yet by the "encore" command.
// It's useful when you use tools that rely on webpack.config.js file.
if (!Encore.isRuntimeEnvironmentConfigured()) {
    Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
}

Encore
    // directory where compiled assets will be stored
    .setOutputPath('public/build/')
    // public path used by the web server to access the output path
    .setPublicPath('/build')
    // only needed for CDN's or sub-directory deploy
    //.setManifestKeyPrefix('build/')

    /*
     * ENTRY CONFIG
     *
     * Add 1 entry for each "page" of your app
     * (including one that's included on every page - e.g. "app")