Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "devDependencies": {
- "@symfony/webpack-encore": "^0.27.0",
- "node-sass": "^4.11.0",
- "sass-loader": "7.0.1",
- "webpack-notifier": "^1.6.0"
- },
- "license": "UNLICENSED",
- "private": true,
- "scripts": {
- "dev-server": "encore dev-server",
- "dev": "encore dev",
- "watch": "encore dev --watch",
- "build": "encore production --progress"
- },
- "dependencies": {
- "choices.js": "^7.0.0",
- "copy-webpack-plugin": "^5.0.1",
- "core-js": "3",
- "fs": "0.0.1-security",
- "swiper": "^4.5.0",
- "webpack-dev-server": "^3.3.1"
- }
- }
- const Encore = require('@symfony/webpack-encore');
- const CopyWebpackPlugin = require('copy-webpack-plugin');
- 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")
- *
- * Each entry will result in one JavaScript file (e.g. app.js)
- * and one CSS file (e.g. app.css) if you JavaScript imports CSS.
- */
- .addEntry('app', './assets/js/app.js')
- .addEntry('index', './assets/js/index.js')
- .addEntry('destination', './assets/js/destination.js')
- .addEntry('agencies', './assets/js/agencies.js')
- .addEntry('country', './assets/js/country.js')
- .addEntry('request', './assets/js/request.js')
- .addEntry('group-travel', './assets/js/group-travel.js')
- .addEntry('about-us', './assets/js/about-us.js')
- .addEntry('contact', './assets/js/contact.js')
- .addEntry('group-travel-details', './assets/js/group-travel-details.js')
- .addEntry('group-travel-order', './assets/js/group-travel-order.js')
- .addEntry('group-travel-summary', './assets/js/group-travel-summary.js')
- // .addEntry('excursion', './assets/js/excursion.js')
- // .addEntry('excursion-details', './assets/js/excursion-details.js')
- // When enabled, Webpack "splits" your files into smaller pieces for greater optimization.
- .splitEntryChunks()
- // will require an extra script tag for runtime.js
- // but, you probably want this, unless you're building a single-page app
- .enableSingleRuntimeChunk()
- .copyFiles([
- {
- from: './assets/images',
- to: 'images/[path][name].[hash:8].[ext]'
- },
- {
- from: './assets/fonts',
- to: 'fonts/[path][name].[ext]'
- }
- ])
- /*
- * FEATURE CONFIG
- *
- * Enable & configure other features below. For a full
- * list of features, see:
- * https://symfony.com/doc/current/frontend.html#adding-more-features
- */
- .cleanupOutputBeforeBuild()
- .enableBuildNotifications()
- .enableSourceMaps(!Encore.isProduction())
- // enables hashed filenames (e.g. app.abc123.css)
- .enableVersioning(Encore.isProduction())
- // enables Sass/SCSS support
- .enableSassLoader()
- // uncomment if you use TypeScript
- //.enableTypeScriptLoader()
- // uncomment if you're having problems with a jQuery plugin
- //.autoProvidejQuery()
- // uncomment if you use API Platform Admin (composer req api-admin)
- //.enableReactPreset()
- //.addEntry('admin', './assets/js/admin.js')
- ;
- module.exports = Encore.getWebpackConfig();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement