Skip to content

Commit 81c01ac

Browse files
author
symfony-flex-server[bot]
authored
Merge pull request #440
2 parents 3c0f009 + 1e413c6 commit 81c01ac

File tree

4 files changed

+49
-15
lines changed

4 files changed

+49
-15
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
body {
2+
background-color: lightgray;
3+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Welcome to your app's main JavaScript file!
3+
*
4+
* We recommend including the built version of this JavaScript file
5+
* (and its CSS file) in your base layout (base.html.twig).
6+
*/
7+
8+
// any CSS you require will output into a single css file (app.css in this case)
9+
require('../css/app.css');
10+
11+
// Need jQuery? Install it with "yarn add jquery", then uncomment to require it.
12+
// var $ = require('jquery');
13+
14+
console.log('Hello Webpack Encore! Edit me in assets/js/app.js');

symfony/webpack-encore-pack/1.0/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"devDependencies": {
3-
"@symfony/webpack-encore": "^0.19.0"
3+
"@symfony/webpack-encore": "^0.19.0",
4+
"webpack-notifier": "^1.6.0"
45
},
56
"license": "UNLICENSED",
67
"private": true,

symfony/webpack-encore-pack/1.0/webpack.config.js

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,46 @@
11
var Encore = require('@symfony/webpack-encore');
22

33
Encore
4-
// the project directory where compiled assets will be stored
4+
// directory where compiled assets will be stored
55
.setOutputPath('public/build/')
6-
// the public path used by the web server to access the previous directory
6+
// public path used by the web server to access the output path
77
.setPublicPath('/build')
8-
// the public path you will use in Symfony's asset() function - e.g. asset('build/some_file.js')
9-
.setManifestKeyPrefix('build/')
10-
8+
// only needed for CDN's or sub-directory deploy
9+
//.setManifestKeyPrefix('build/')
10+
11+
/*
12+
* ENTRY CONFIG
13+
*
14+
* Add 1 entry for each "page" of your app
15+
* (including one that's included on every page - e.g. "app")
16+
*
17+
* Each entry will result in one JavaScript file (e.g. app.js)
18+
* and one CSS file (e.g. app.css) if you JavaScript imports CSS.
19+
*/
20+
.addEntry('app', './assets/js/app.js')
21+
//.addEntry('page1', './assets/js/page1.js')
22+
//.addEntry('page2', './assets/js/page2.js')
23+
24+
/*
25+
* FEATURE CONFIG
26+
*
27+
* Enable & configure other features below. For a full
28+
* list of features, see:
29+
* https://symfony.com/doc/current/frontend.html#adding-more-features
30+
*/
1131
.cleanupOutputBeforeBuild()
32+
.enableBuildNotifications()
1233
.enableSourceMaps(!Encore.isProduction())
13-
14-
// the following line enables hashed filenames (e.g. app.abc123.css)
34+
// enables hashed filenames (e.g. app.abc123.css)
1535
.enableVersioning(Encore.isProduction())
1636

17-
// uncomment to define the assets of the project
18-
//.addEntry('js/app', './assets/js/app.js')
19-
//.addStyleEntry('css/app', './assets/css/app.scss')
37+
// enables Sass/SCSS support
38+
//.enableSassLoader()
2039

2140
// uncomment if you use TypeScript
2241
//.enableTypeScriptLoader()
2342

24-
// uncomment if you use Sass/SCSS files
25-
//.enableSassLoader()
26-
27-
// uncomment for legacy applications that require $/jQuery as a global variable
43+
// uncomment if you're having problems with a jQuery plugin
2844
//.autoProvidejQuery()
2945
;
3046

0 commit comments

Comments
 (0)