Advertisement
Guest User

Untitled

a guest
May 24th, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {
  2.     "devDependencies": {
  3.         "@symfony/webpack-encore": "^0.27.0",
  4.         "node-sass": "^4.11.0",
  5.         "sass-loader": "7.0.1",
  6.         "webpack-notifier": "^1.6.0"
  7.     },
  8.     "license": "UNLICENSED",
  9.     "private": true,
  10.     "scripts": {
  11.         "dev-server": "encore dev-server",
  12.         "dev": "encore dev",
  13.         "watch": "encore dev --watch",
  14.         "build": "encore production --progress"
  15.     },
  16.     "dependencies": {
  17.         "choices.js": "^7.0.0",
  18.         "copy-webpack-plugin": "^5.0.1",
  19.         "core-js": "3",
  20.         "fs": "0.0.1-security",
  21.         "swiper": "^4.5.0",
  22.         "webpack-dev-server": "^3.3.1"
  23.     }
  24. }
  25.  
  26.  
  27. const Encore = require('@symfony/webpack-encore');
  28. const CopyWebpackPlugin = require('copy-webpack-plugin');
  29.  
  30. Encore
  31.     // directory where compiled assets will be stored
  32.     .setOutputPath('public/build/')
  33.     // public path used by the web server to access the output path
  34.     .setPublicPath('/build')
  35.     // only needed for CDN's or sub-directory deploy
  36.     //.setManifestKeyPrefix('build/')
  37.  
  38.     /*
  39.      * ENTRY CONFIG
  40.      *
  41.      * Add 1 entry for each "page" of your app
  42.      * (including one that's included on every page - e.g. "app")
  43.      *
  44.      * Each entry will result in one JavaScript file (e.g. app.js)
  45.      * and one CSS file (e.g. app.css) if you JavaScript imports CSS.
  46.      */
  47.     .addEntry('app', './assets/js/app.js')
  48.     .addEntry('index', './assets/js/index.js')
  49.     .addEntry('destination', './assets/js/destination.js')
  50.     .addEntry('agencies', './assets/js/agencies.js')
  51.     .addEntry('country', './assets/js/country.js')
  52.     .addEntry('request', './assets/js/request.js')
  53.     .addEntry('group-travel', './assets/js/group-travel.js')
  54.     .addEntry('about-us', './assets/js/about-us.js')
  55.     .addEntry('contact', './assets/js/contact.js')
  56.     .addEntry('group-travel-details', './assets/js/group-travel-details.js')
  57.     .addEntry('group-travel-order', './assets/js/group-travel-order.js')
  58.     .addEntry('group-travel-summary', './assets/js/group-travel-summary.js')
  59.     // .addEntry('excursion', './assets/js/excursion.js')
  60.     // .addEntry('excursion-details', './assets/js/excursion-details.js')
  61.  
  62.  
  63.     // When enabled, Webpack "splits" your files into smaller pieces for greater optimization.
  64.     .splitEntryChunks()
  65.  
  66.     // will require an extra script tag for runtime.js
  67.     // but, you probably want this, unless you're building a single-page app
  68.     .enableSingleRuntimeChunk()
  69.     .copyFiles([
  70.         {
  71.             from: './assets/images',
  72.             to: 'images/[path][name].[hash:8].[ext]'
  73.         },
  74.         {
  75.             from: './assets/fonts',
  76.             to: 'fonts/[path][name].[ext]'
  77.         }
  78.     ])
  79.     /*
  80.      * FEATURE CONFIG
  81.      *
  82.      * Enable & configure other features below. For a full
  83.      * list of features, see:
  84.      * https://symfony.com/doc/current/frontend.html#adding-more-features
  85.      */
  86.     .cleanupOutputBeforeBuild()
  87.     .enableBuildNotifications()
  88.     .enableSourceMaps(!Encore.isProduction())
  89.     // enables hashed filenames (e.g. app.abc123.css)
  90.     .enableVersioning(Encore.isProduction())
  91.  
  92.     // enables Sass/SCSS support
  93.     .enableSassLoader()
  94.  
  95.     // uncomment if you use TypeScript
  96.     //.enableTypeScriptLoader()
  97.  
  98.     // uncomment if you're having problems with a jQuery plugin
  99.     //.autoProvidejQuery()
  100.  
  101.     // uncomment if you use API Platform Admin (composer req api-admin)
  102.     //.enableReactPreset()
  103.     //.addEntry('admin', './assets/js/admin.js')
  104. ;
  105.  
  106. module.exports = Encore.getWebpackConfig();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement