Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@symfony/webpack-encore

Package Overview
Dependencies
Maintainers
0
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@symfony/webpack-encore - npm Package Versions

23
9

5.0.1

Diff

Changelog

Source

5.0.1

  • #1349 Fix issue between Encore.enableIntegrityHashes() and filenames with a query-string (@Kocal)
kocal
published 5.0.0 •

Changelog

Source

5.0.0

This is a new major version that contains several backwards-compatibility breaks.

Features

  • #1344 Add options configuration callback to Encore.enableReactPreset() (@Kocal)

  • #1345 Add support for integrity hashes when asset names contain a query string (@Kocal)

BC Breaks

  • #1321 Drop support of Node.js 19 and 21 (@Kocal)

  • #1307 Drop webpack-cli 4 support, only webpack-cli ^5.1.4 is supported (@Kocal)

  • #1318 Drop webpack-dev-server 4 support, only webpack-dev-server 5 is supported (@Kocal)

The dev-server options have changed between versions 4 and 5, see the official migration guide to v5. For example:

// With webpack-dev-server 4:
Encore.configureDevServerOptions((options) => {
   options.https = {
     ca: "./path/to/server.pem",
     pfx: "./path/to/server.pfx",
     key: "./path/to/server.key",
     cert: "./path/to/server.crt",
     passphrase: "webpack-dev-server",
     requestCert: true,
   };
});

// With webpack-dev-server 5 (now):
Encore.configureDevServerOptions((options) => {
   options.server = {
      type: 'https',
      options: {
         ca: "./path/to/server.pem",
         pfx: "./path/to/server.pfx",
         key: "./path/to/server.key",
         cert: "./path/to/server.crt",
         passphrase: "webpack-dev-server",
         requestCert: true,
      }
   };
});
  • #1336 Make webpack-dev-server dependency optional (@Kocal)

The webpack-dev-server package is now an optional peer dependency. It has been removed because some projects may not use it, and it was installing a bunch of unnecessary dependencies.

Removing the webpack-dev-server dependency from Encore reduces the number of dependencies from 626 to 295 (-331!), it helps to reduce the size of the node_modules directory and the number of possible vulnerabilities.

To use the webpack-dev-server again, you need to install it manually:

npm install webpack-dev-server --save-dev
# or 
yarn add webpack-dev-server --dev
# or 
pnpm install webpack-dev-server --save-dev
  • #1308 Drop Vue 2 support (End-Of-Life), only Vue 3 is supported (@Kocal)

  • #1309 Drop ESLint integration (@Kocal)

  • #1313 Drop clean-webpack-plugin in favor of webpack's output.clean configuration. The configuration settings supported by Encore.cleanupOutputBeforeBuild have changed (@stof)

  • #1324 Drop css-minimizer-webpack-plugin 5 support, only css-minimizer-webpack-plugin 7 is supported (@Kocal)

  • #1342 Replace assets-webpack-plugin dependency by an internal plugin, to generate entrypoints.json file (@Kocal)

  • #1317 Drop support of sass-loader ^13 and ^14, add support for sass-loader ^16 (@Kocal)

The sass-loader's options have changed, the modern options are now used by default. Though not recommended, you must specify the option api: 'legacy' if you want to keep the legacy options. For example:

// With the legacy API:
Encore.enableSassLoader((options) => {
    options.api = 'legacy';
    options.includePaths = [/*...*/];
});

// With the modern API (default):
Encore.enableSassLoader((options) => {
   options.loadPaths = [/*...*/];
});
  • #1319 Drop support of css-loader ^6, add support for css-loader ^7.1 (@Kocal)

Since css-loader 7.0.0, styles imports became named by default. It means you should update your code from:

import style from "./style.css";

console.log(style.myClass);

to:

import * as style from "./style.css";

console.log(style.myClass);

There is also a possibility to keep the previous behavior by configuring the css-loader's modules option:

config.configureCssLoader(options => {
   if (options.modules) {
       options.modules.namedExport = false;
       options.modules.exportLocalsConvention = 'as-is';
   } 
});

[!IMPORTANT]
If you use CSS Modules inside .vue files, until https://github.com/vuejs/vue-loader/pull/1909 is merged and released, you will need to restore the previous behavior by configuring Encore with the code above.

  • #1333 Replace chalk by picocolors (@Kocal)

Internal

  • #1325 Remove no-op argument (@stof)

  • #1327 Fix compat with configuring the devserver server as a string (@stof)

  • #1328 Remove non-existent option in our package-up utility (@stof)

  • #1329 Read the controllers.json as string rather than Buffer (@stof)

  • #1330 Add some types in the internal implementation of Encore (@stof)

  • #1331 test(deps): replace Zombie by Puppeteer (@Kocal)

  • #1332 Upgrade locked dependencies (@stof)

  • #1334 Upgrade the version of stylus used in dev (@stof)

  • #1335 Fix ESLint warning (@stof)

  • #1339 Add PR template (@Kocal)

  • #1343 Add tests for CSS Modules with React and Preact (@Kocal)

kocal
published 4.7.0 •

Changelog

Source

4.7.0

Features

  • #1284 Improve ESLint and Babel help messages, when enabling ESLint integration (@Kocal)

  • #1285 Add support for PNPM for installation commands (@Kocal)

  • #1286 Add support for Node.js 22 (@Kocal)

  • #1299 Add support for less-loader 12 (@Kocal)

  • #1301 Add support for postcss-loader 8 (@Kocal)

  • #1302 Add support for stylus-loader 8 (@Kocal)

  • #1295 Add JSX support for Vue 3 (@Kocal)

Enabling JSX support for Vue 3 is done with the Encore.enableVueLoader():

Encore.enableVueLoader(() => {}, { 
    useJsx: true,
    version: 3,
});

If you don't have a custom Babel configuration, then you're all set! But if you do, you may need to adjust it to add @vue/babel-plugin-jsx plugin to your Babel configuration:

// babel.config.js
module.exports = {
    plugins: [
        '@vue/babel-plugin-jsx'
    ]
};

Deprecations

  • #1278 Deprecate ESLint integration (@Kocal)

  • #1298 Deprecate Vue 2 support (@Kocal)

Internal

  • #1275 Update some dev-dependencies to fix vulnerability issues (@Kocal)

  • #1259 Update yarn used for test_apps to latest version (@karpilin)

  • #1297 Upgrade GitHub Actions in CI (@Kocal)

  • #1304 Replace fast-levenshtein by fastest-levenshtein (@Kocal)

  • #1303 Replace pkg-up by an inlined solution (@Kocal)

weaverryan
published 4.6.1 •

Changelog

Source

v4.6.1

  • #1256 Re-adding node 18 support (@weaverryan)
weaverryan
published 4.6.0 •

Changelog

Source

v4.6.0

  • #1254 Increased minimum Node version to 20 (@weaverryan)

  • #1253 Allow sass-loader 14 (@cedric-anne)

  • #1247 Allow only configuring a plugin (@gimler)

weaverryan
published 4.5.0 •

Changelog

Source

v4.5.0

Features

  • #1235 Dropping support for Node 14 (16 is new min) and allowing svelte 4 (@weaverryan)

  • #1185 Bump babel-loader from 8.2.5 to 9.1.2 (@dppanteon) - the CHANGELOG for babel 9 does not list any breaking changes besides increasing the minimum Node version.

  • #1224 Allow fork-ts-checker-webpack-plugin ^8.0 and ^9.0 (@buffcode)

weaverryan
published 4.4.0 •

Changelog

Source

v4.4.0

Features

  • #1203 upgrade css-minimizer-webpack-plugin from 4 to 5
weaverryan
published 4.3.0 •

Changelog

Source

v4.3.0

Features

  • #1200 Allow TypeScript 5 (@jmsche)
  • #1190 Allow eslint-webpack-plugin ^4.0 (@evertharmeling)

Bugs

  • #1175 Delay force sync until needed (@wesoledi, @weaverryan)
weaverryan
published 4.2.0 •

Changelog

Source

v4.2.0

Features

  • Allow webpack-cli version 5 to be used in your package.json file
weaverryan
published 4.1.2 •

23
9
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc