From fc52c0d407ba9566e590a4906c9e99afc7373097 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Mon, 30 Jan 2023 13:21:30 -0800 Subject: [PATCH] Update README.md --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6dd41ddd..71d2ec2f 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,8 @@ Configure inside your `webpack.config.js`: svelte: path.resolve('node_modules', 'svelte') }, extensions: ['.mjs', '.js', '.svelte'], - mainFields: ['svelte', 'browser', 'module', 'main'] + mainFields: ['svelte', 'browser', 'module', 'main'], + conditionNames: ['svelte'] }, module: { rules: [ @@ -56,7 +57,11 @@ The [`resolve.alias`](https://webpack.js.org/configuration/resolve/#resolvealias ### resolve.mainFields -Webpack's [`resolve.mainFields`](https://webpack.js.org/configuration/resolve/#resolve-mainfields) option determines which fields in package.json are used to resolve identifiers. If you're using Svelte components installed from npm, you should specify this option so that your app can use the original component source code, rather than consuming the already-compiled version (which is less efficient). +Webpack's [`resolve.mainFields`](https://webpack.js.org/configuration/resolve/#resolve-mainfields) option determines which fields in `package.json` are used to resolve identifiers. If you're using Svelte components installed from npm, you should specify this option so that your app can use the original component source code, rather than consuming the already-compiled version (which is less efficient). + +### resolve.conditionNames + +Webpack's [`resolve.conditionNames`](https://webpack.js.org/configuration/resolve/#resolveconditionnames) option determines which fields in the `exports in `package.json` are used to resolve identifiers. If you're using Svelte components installed from npm, you should specify this option so that your app can use the original component source code, rather than consuming the already-compiled version (which is less efficient). ### Extracting CSS