diff --git a/symfony/webpack-encore-pack/1.0/assets/.gitignore b/symfony/webpack-encore-bundle/1.0/assets/.gitignore similarity index 100% rename from symfony/webpack-encore-pack/1.0/assets/.gitignore rename to symfony/webpack-encore-bundle/1.0/assets/.gitignore diff --git a/symfony/webpack-encore-pack/1.0/assets/css/app.css b/symfony/webpack-encore-bundle/1.0/assets/css/app.css similarity index 100% rename from symfony/webpack-encore-pack/1.0/assets/css/app.css rename to symfony/webpack-encore-bundle/1.0/assets/css/app.css diff --git a/symfony/webpack-encore-pack/1.0/assets/js/app.js b/symfony/webpack-encore-bundle/1.0/assets/js/app.js similarity index 100% rename from symfony/webpack-encore-pack/1.0/assets/js/app.js rename to symfony/webpack-encore-bundle/1.0/assets/js/app.js diff --git a/symfony/webpack-encore-pack/1.0/config/packages/assets.yaml b/symfony/webpack-encore-bundle/1.0/config/packages/assets.yaml similarity index 100% rename from symfony/webpack-encore-pack/1.0/config/packages/assets.yaml rename to symfony/webpack-encore-bundle/1.0/config/packages/assets.yaml diff --git a/symfony/webpack-encore-bundle/1.0/config/packages/webpack_encore.yaml b/symfony/webpack-encore-bundle/1.0/config/packages/webpack_encore.yaml new file mode 100644 index 000000000..c1c19d37b --- /dev/null +++ b/symfony/webpack-encore-bundle/1.0/config/packages/webpack_encore.yaml @@ -0,0 +1,4 @@ +webpack_encore: + # The path where Encore is building the assets. + # This should match Encore.setOutputPath() in webpack.config.js. + output_path: '%kernel.project_dir%/public/build' diff --git a/symfony/webpack-encore-bundle/1.0/manifest.json b/symfony/webpack-encore-bundle/1.0/manifest.json new file mode 100644 index 000000000..2b6e9f772 --- /dev/null +++ b/symfony/webpack-encore-bundle/1.0/manifest.json @@ -0,0 +1,18 @@ +{ + "bundles": { + "Symfony\\WebpackEncoreBundle\\WebpackEncoreBundle": ["all"] + }, + "copy-from-recipe": { + "assets/": "assets/", + "config/": "%CONFIG_DIR%/", + "package.json": "package.json", + "webpack.config.js": "webpack.config.js" + }, + "aliases": ["encore", "webpack", "webpack-encore"], + "gitignore": [ + "/node_modules/", + "/%PUBLIC_DIR%/build/", + "npm-debug.log", + "yarn-error.log" + ] +} diff --git a/symfony/webpack-encore-pack/1.0/package.json b/symfony/webpack-encore-bundle/1.0/package.json similarity index 86% rename from symfony/webpack-encore-pack/1.0/package.json rename to symfony/webpack-encore-bundle/1.0/package.json index b7add2246..b7e55456a 100644 --- a/symfony/webpack-encore-pack/1.0/package.json +++ b/symfony/webpack-encore-bundle/1.0/package.json @@ -1,6 +1,6 @@ { "devDependencies": { - "@symfony/webpack-encore": "^0.20.0", + "@symfony/webpack-encore": "^0.21.0", "webpack-notifier": "^1.6.0" }, "license": "UNLICENSED", diff --git a/symfony/webpack-encore-pack/1.0/webpack.config.js b/symfony/webpack-encore-bundle/1.0/webpack.config.js similarity index 89% rename from symfony/webpack-encore-pack/1.0/webpack.config.js rename to symfony/webpack-encore-bundle/1.0/webpack.config.js index d66323de0..5c3109ebe 100644 --- a/symfony/webpack-encore-pack/1.0/webpack.config.js +++ b/symfony/webpack-encore-bundle/1.0/webpack.config.js @@ -21,6 +21,10 @@ Encore //.addEntry('page1', './assets/js/page1.js') //.addEntry('page2', './assets/js/page2.js') + // will require an extra script tag for runtime.js + // but, you probably want this, unless you're building a single-page app + .enableSingleRuntimeChunk() + /* * FEATURE CONFIG * diff --git a/symfony/webpack-encore-pack/1.0/manifest.json b/symfony/webpack-encore-pack/1.0/manifest.json index d50fbce8f..e5e1354f4 100644 --- a/symfony/webpack-encore-pack/1.0/manifest.json +++ b/symfony/webpack-encore-pack/1.0/manifest.json @@ -1,11 +1,4 @@ { - "copy-from-recipe": { - "assets/": "assets/", - "config/": "%CONFIG_DIR%/", - "package.json": "package.json", - "webpack.config.js": "webpack.config.js" - }, - "aliases": ["encore", "webpack", "webpack-encore"], "gitignore": [ "/node_modules/", "/%PUBLIC_DIR%/build/", diff --git a/symfony/webpack-encore-pack/1.0/post-install.txt b/symfony/webpack-encore-pack/1.0/post-install.txt new file mode 100644 index 000000000..d20d64e4f --- /dev/null +++ b/symfony/webpack-encore-pack/1.0/post-install.txt @@ -0,0 +1,7 @@ + + The symfony/webpack-encore-pack is no longer required anymore. Instead, use symfony/webpack-encore-bundle. + + + * Instead: + 1. Remove it now: composer remove symfony/webpack-encore-pack + 2. Use Symfony's bridge: composer require encore