diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a47cfc5..f5b60482 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # svelte-loader changelog +## 3.0.0 + +* **Breaking change**: if `emitCss` is enabled, you have to add a `SveltePlugin` to your `webpack.config.js` like so: ([#146](https://github.com/sveltejs/svelte-loader/pull/146)) + ```js + const SveltePlugin = require('svelte-loader').plugin; // at top of config + ... + module.exports = { + ... + plugins: [ + ... + new SveltePlugin(), + ... + ] + ... + }; + ``` +* Webpack 5 is now supported +* Fix intermittent crashes when using `cache-loader` in front of `svelte-loader` ([#125](https://github.com/sveltejs/svelte-loader/pull/125)) + ## 2.13.6 * Check whether the filesystem implements `purge` before calling it ([#81](https://github.com/sveltejs/svelte-loader/pull/81)) diff --git a/README.md b/README.md index 61d5a0a1..9a7b3a3a 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,13 @@ Configure inside your `webpack.config.js`: test: /\.(html|svelte)$/, exclude: /node_modules/, use: 'svelte-loader' + }, + { + // required to prevent errors from Svelte on Webpack 5+ + test: /node_modules\/svelte\/.*\.mjs$/, + resolve: { + fullySpecified: false + } } ... ] @@ -54,9 +61,13 @@ Webpack's [`resolve.mainFields`](https://webpack.js.org/configuration/resolve/#r If your Svelte components contain `