mirror of
https://github.com/symfony/recipes.git
synced 2026-09-12 07:36:30 +03:00
Merge pull request #440
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
body {
|
||||||
|
background-color: lightgray;
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
/*
|
||||||
|
* Welcome to your app's main JavaScript file!
|
||||||
|
*
|
||||||
|
* We recommend including the built version of this JavaScript file
|
||||||
|
* (and its CSS file) in your base layout (base.html.twig).
|
||||||
|
*/
|
||||||
|
|
||||||
|
// any CSS you require will output into a single css file (app.css in this case)
|
||||||
|
require('../css/app.css');
|
||||||
|
|
||||||
|
// Need jQuery? Install it with "yarn add jquery", then uncomment to require it.
|
||||||
|
// var $ = require('jquery');
|
||||||
|
|
||||||
|
console.log('Hello Webpack Encore! Edit me in assets/js/app.js');
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@symfony/webpack-encore": "^0.19.0"
|
"@symfony/webpack-encore": "^0.19.0",
|
||||||
|
"webpack-notifier": "^1.6.0"
|
||||||
},
|
},
|
||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
@@ -1,30 +1,46 @@
|
|||||||
var Encore = require('@symfony/webpack-encore');
|
var Encore = require('@symfony/webpack-encore');
|
||||||
|
|
||||||
Encore
|
Encore
|
||||||
// the project directory where compiled assets will be stored
|
// directory where compiled assets will be stored
|
||||||
.setOutputPath('public/build/')
|
.setOutputPath('public/build/')
|
||||||
// the public path used by the web server to access the previous directory
|
// public path used by the web server to access the output path
|
||||||
.setPublicPath('/build')
|
.setPublicPath('/build')
|
||||||
// the public path you will use in Symfony's asset() function - e.g. asset('build/some_file.js')
|
// only needed for CDN's or sub-directory deploy
|
||||||
.setManifestKeyPrefix('build/')
|
//.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('page1', './assets/js/page1.js')
|
||||||
|
//.addEntry('page2', './assets/js/page2.js')
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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()
|
.cleanupOutputBeforeBuild()
|
||||||
|
.enableBuildNotifications()
|
||||||
.enableSourceMaps(!Encore.isProduction())
|
.enableSourceMaps(!Encore.isProduction())
|
||||||
|
// enables hashed filenames (e.g. app.abc123.css)
|
||||||
// the following line enables hashed filenames (e.g. app.abc123.css)
|
|
||||||
.enableVersioning(Encore.isProduction())
|
.enableVersioning(Encore.isProduction())
|
||||||
|
|
||||||
// uncomment to define the assets of the project
|
// enables Sass/SCSS support
|
||||||
//.addEntry('js/app', './assets/js/app.js')
|
//.enableSassLoader()
|
||||||
//.addStyleEntry('css/app', './assets/css/app.scss')
|
|
||||||
|
|
||||||
// uncomment if you use TypeScript
|
// uncomment if you use TypeScript
|
||||||
//.enableTypeScriptLoader()
|
//.enableTypeScriptLoader()
|
||||||
|
|
||||||
// uncomment if you use Sass/SCSS files
|
// uncomment if you're having problems with a jQuery plugin
|
||||||
//.enableSassLoader()
|
|
||||||
|
|
||||||
// uncomment for legacy applications that require $/jQuery as a global variable
|
|
||||||
//.autoProvidejQuery()
|
//.autoProvidejQuery()
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user