diff --git a/package.json b/package.json index dcfccee..4485e54 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vite-plugin-solid", - "version": "2.2.5", + "version": "2.2.6", "description": "solid-js integration plugin for vite 2", "type": "module", "files": [ @@ -46,7 +46,7 @@ "merge-anything": "^5.0.2", "solid-js": "^1.3.3", "solid-refresh": "^0.4.0", - "vite": "^2.7.13" + "vite": "^2.8.0" }, "devDependencies": { "@babel/plugin-transform-typescript": "^7.16.8", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 960a80b..2098f82 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,7 +19,7 @@ specifiers: solid-js: ^1.3.3 solid-refresh: ^0.4.0 typescript: ^4.5.5 - vite: ^2.7.13 + vite: ^2.8.0 dependencies: '@babel/core': 7.16.12 @@ -28,7 +28,7 @@ dependencies: merge-anything: 5.0.2 solid-js: 1.3.3 solid-refresh: 0.4.0_solid-js@1.3.3 - vite: 2.7.13 + vite: 2.8.6 devDependencies: '@babel/plugin-transform-typescript': 7.16.8_@babel+core@7.16.12 @@ -1504,164 +1504,212 @@ packages: /electron-to-chromium/1.4.53: resolution: {integrity: sha512-rFveSKQczlcav+H3zkKqykU6ANseFwXwkl855jOIap5/0gnEcuIhv2ecz6aoTrXavF6I/CEBeRnBnkB51k06ew==} - /esbuild-android-arm64/0.13.15: - resolution: {integrity: sha512-m602nft/XXeO8YQPUDVoHfjyRVPdPgjyyXOxZ44MK/agewFFkPa8tUo6lAzSWh5Ui5PB4KR9UIFTSBKh/RrCmg==} + /esbuild-android-64/0.14.25: + resolution: {integrity: sha512-L5vCUk7TzFbBnoESNoXjU3x9+/+7TDIE/1mTfy/erAfvZAqC+S3sp/Qa9wkypFMcFvN9FzvESkTlpeQDolREtQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: false + optional: true + + /esbuild-android-arm64/0.14.25: + resolution: {integrity: sha512-4jv5xPjM/qNm27T5j3ZEck0PvjgQtoMHnz4FzwF5zNP56PvY2CT0WStcAIl6jNlsuDdN63rk2HRBIsO6xFbcFw==} + engines: {node: '>=12'} cpu: [arm64] os: [android] requiresBuild: true dev: false optional: true - /esbuild-darwin-64/0.13.15: - resolution: {integrity: sha512-ihOQRGs2yyp7t5bArCwnvn2Atr6X4axqPpEdCFPVp7iUj4cVSdisgvEKdNR7yH3JDjW6aQDw40iQFoTqejqxvQ==} + /esbuild-darwin-64/0.14.25: + resolution: {integrity: sha512-TGp8tuudIxOyWd1+8aYPxQmC1ZQyvij/AfNBa35RubixD0zJ1vkKHVAzo0Zao1zcG6pNqiSyzfPto8vmg0s7oA==} + engines: {node: '>=12'} cpu: [x64] os: [darwin] requiresBuild: true dev: false optional: true - /esbuild-darwin-arm64/0.13.15: - resolution: {integrity: sha512-i1FZssTVxUqNlJ6cBTj5YQj4imWy3m49RZRnHhLpefFIh0To05ow9DTrXROTE1urGTQCloFUXTX8QfGJy1P8dQ==} + /esbuild-darwin-arm64/0.14.25: + resolution: {integrity: sha512-oTcDgdm0MDVEmw2DWu8BV68pYuImpFgvWREPErBZmNA4MYKGuBRaCiJqq6jZmBR1x+3y1DWCjez+5uLtuAm6mw==} + engines: {node: '>=12'} cpu: [arm64] os: [darwin] requiresBuild: true dev: false optional: true - /esbuild-freebsd-64/0.13.15: - resolution: {integrity: sha512-G3dLBXUI6lC6Z09/x+WtXBXbOYQZ0E8TDBqvn7aMaOCzryJs8LyVXKY4CPnHFXZAbSwkCbqiPuSQ1+HhrNk7EA==} + /esbuild-freebsd-64/0.14.25: + resolution: {integrity: sha512-ueAqbnMZ8arnuLH8tHwTCQYeptnHOUV7vA6px6j4zjjQwDx7TdP7kACPf3TLZLdJQ3CAD1XCvQ2sPhX+8tacvQ==} + engines: {node: '>=12'} cpu: [x64] os: [freebsd] requiresBuild: true dev: false optional: true - /esbuild-freebsd-arm64/0.13.15: - resolution: {integrity: sha512-KJx0fzEDf1uhNOZQStV4ujg30WlnwqUASaGSFPhznLM/bbheu9HhqZ6mJJZM32lkyfGJikw0jg7v3S0oAvtvQQ==} + /esbuild-freebsd-arm64/0.14.25: + resolution: {integrity: sha512-+ZVWud2HKh+Ob6k/qiJWjBtUg4KmJGGmbvEXXW1SNKS7hW7HU+Zq2ZCcE1akFxOPkVB+EhOty/sSek30tkCYug==} + engines: {node: '>=12'} cpu: [arm64] os: [freebsd] requiresBuild: true dev: false optional: true - /esbuild-linux-32/0.13.15: - resolution: {integrity: sha512-ZvTBPk0YWCLMCXiFmD5EUtB30zIPvC5Itxz0mdTu/xZBbbHJftQgLWY49wEPSn2T/TxahYCRDWun5smRa0Tu+g==} + /esbuild-linux-32/0.14.25: + resolution: {integrity: sha512-3OP/lwV3kCzEz45tobH9nj+uE4ubhGsfx+tn0L26WAGtUbmmcRpqy7XRG/qK7h1mClZ+eguIANcQntYMdYklfw==} + engines: {node: '>=12'} cpu: [ia32] os: [linux] requiresBuild: true dev: false optional: true - /esbuild-linux-64/0.13.15: - resolution: {integrity: sha512-eCKzkNSLywNeQTRBxJRQ0jxRCl2YWdMB3+PkWFo2BBQYC5mISLIVIjThNtn6HUNqua1pnvgP5xX0nHbZbPj5oA==} + /esbuild-linux-64/0.14.25: + resolution: {integrity: sha512-+aKHdHZmX9qwVlQmu5xYXh7GsBFf4TWrePgeJTalhXHOG7NNuUwoHmketGiZEoNsWyyqwH9rE5BC+iwcLY30Ug==} + engines: {node: '>=12'} cpu: [x64] os: [linux] requiresBuild: true dev: false optional: true - /esbuild-linux-arm/0.13.15: - resolution: {integrity: sha512-wUHttDi/ol0tD8ZgUMDH8Ef7IbDX+/UsWJOXaAyTdkT7Yy9ZBqPg8bgB/Dn3CZ9SBpNieozrPRHm0BGww7W/jA==} + /esbuild-linux-arm/0.14.25: + resolution: {integrity: sha512-aTLcE2VBoLydL943REcAcgnDi3bHtmULSXWLbjtBdtykRatJVSxKMjK9YlBXUZC4/YcNQfH7AxwVeQr9fNxPhw==} + engines: {node: '>=12'} cpu: [arm] os: [linux] requiresBuild: true dev: false optional: true - /esbuild-linux-arm64/0.13.15: - resolution: {integrity: sha512-bYpuUlN6qYU9slzr/ltyLTR9YTBS7qUDymO8SV7kjeNext61OdmqFAzuVZom+OLW1HPHseBfJ/JfdSlx8oTUoA==} + /esbuild-linux-arm64/0.14.25: + resolution: {integrity: sha512-UxfenPx/wSZx55gScCImPtXekvZQLI2GW3qe5dtlmU7luiqhp5GWPzGeQEbD3yN3xg/pHc671m5bma5Ns7lBHw==} + engines: {node: '>=12'} cpu: [arm64] os: [linux] requiresBuild: true dev: false optional: true - /esbuild-linux-mips64le/0.13.15: - resolution: {integrity: sha512-KlVjIG828uFPyJkO/8gKwy9RbXhCEUeFsCGOJBepUlpa7G8/SeZgncUEz/tOOUJTcWMTmFMtdd3GElGyAtbSWg==} + /esbuild-linux-mips64le/0.14.25: + resolution: {integrity: sha512-wLWYyqVfYx9Ur6eU5RT92yJVsaBGi5RdkoWqRHOqcJ38Kn60QMlcghsKeWfe9jcYut8LangYZ98xO1LxIoSXrQ==} + engines: {node: '>=12'} cpu: [mips64el] os: [linux] requiresBuild: true dev: false optional: true - /esbuild-linux-ppc64le/0.13.15: - resolution: {integrity: sha512-h6gYF+OsaqEuBjeesTBtUPw0bmiDu7eAeuc2OEH9S6mV9/jPhPdhOWzdeshb0BskRZxPhxPOjqZ+/OqLcxQwEQ==} + /esbuild-linux-ppc64le/0.14.25: + resolution: {integrity: sha512-0dR6Csl6Zas3g4p9ULckEl8Mo8IInJh33VCJ3eaV1hj9+MHGdmDOakYMN8MZP9/5nl+NU/0ygpd14cWgy8uqRw==} + engines: {node: '>=12'} cpu: [ppc64] os: [linux] requiresBuild: true dev: false optional: true - /esbuild-netbsd-64/0.13.15: - resolution: {integrity: sha512-3+yE9emwoevLMyvu+iR3rsa+Xwhie7ZEHMGDQ6dkqP/ndFzRHkobHUKTe+NCApSqG5ce2z4rFu+NX/UHnxlh3w==} + /esbuild-linux-riscv64/0.14.25: + resolution: {integrity: sha512-J4d20HDmTrgvhR0bdkDhvvJGaikH3LzXQnNaseo8rcw9Yqby9A90gKUmWpfwqLVNRILvNnAmKLfBjCKU9ajg8w==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /esbuild-linux-s390x/0.14.25: + resolution: {integrity: sha512-YI2d5V6nTE73ZnhEKQD7MtsPs1EtUZJ3obS21oxQxGbbRw1G+PtJKjNyur+3t6nzHP9oTg6GHQ3S3hOLLmbDIQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /esbuild-netbsd-64/0.14.25: + resolution: {integrity: sha512-TKIVgNWLUOkr+Exrye70XTEE1lJjdQXdM4tAXRzfHE9iBA7LXWcNtVIuSnphTqpanPzTDFarF0yqq4kpbC6miA==} + engines: {node: '>=12'} cpu: [x64] os: [netbsd] requiresBuild: true dev: false optional: true - /esbuild-openbsd-64/0.13.15: - resolution: {integrity: sha512-wTfvtwYJYAFL1fSs8yHIdf5GEE4NkbtbXtjLWjM3Cw8mmQKqsg8kTiqJ9NJQe5NX/5Qlo7Xd9r1yKMMkHllp5g==} + /esbuild-openbsd-64/0.14.25: + resolution: {integrity: sha512-QgFJ37A15D7NIXBTYEqz29+uw3nNBOIyog+3kFidANn6kjw0GHZ0lEYQn+cwjyzu94WobR+fes7cTl/ZYlHb1A==} + engines: {node: '>=12'} cpu: [x64] os: [openbsd] requiresBuild: true dev: false optional: true - /esbuild-sunos-64/0.13.15: - resolution: {integrity: sha512-lbivT9Bx3t1iWWrSnGyBP9ODriEvWDRiweAs69vI+miJoeKwHWOComSRukttbuzjZ8r1q0mQJ8Z7yUsDJ3hKdw==} + /esbuild-sunos-64/0.14.25: + resolution: {integrity: sha512-rmWfjUItYIVlqr5EnTH1+GCxXiBOC42WBZ3w++qh7n2cS9Xo0lO5pGSG2N+huOU2fX5L+6YUuJ78/vOYvefeFw==} + engines: {node: '>=12'} cpu: [x64] os: [sunos] requiresBuild: true dev: false optional: true - /esbuild-windows-32/0.13.15: - resolution: {integrity: sha512-fDMEf2g3SsJ599MBr50cY5ve5lP1wyVwTe6aLJsM01KtxyKkB4UT+fc5MXQFn3RLrAIAZOG+tHC+yXObpSn7Nw==} + /esbuild-windows-32/0.14.25: + resolution: {integrity: sha512-HGAxVUofl3iUIz9W10Y9XKtD0bNsK9fBXv1D55N/ljNvkrAYcGB8YCm0v7DjlwtyS6ws3dkdQyXadbxkbzaKOA==} + engines: {node: '>=12'} cpu: [ia32] os: [win32] requiresBuild: true dev: false optional: true - /esbuild-windows-64/0.13.15: - resolution: {integrity: sha512-9aMsPRGDWCd3bGjUIKG/ZOJPKsiztlxl/Q3C1XDswO6eNX/Jtwu4M+jb6YDH9hRSUflQWX0XKAfWzgy5Wk54JQ==} + /esbuild-windows-64/0.14.25: + resolution: {integrity: sha512-TirEohRkfWU9hXLgoDxzhMQD1g8I2mOqvdQF2RS9E/wbkORTAqJHyh7wqGRCQAwNzdNXdg3JAyhQ9/177AadWA==} + engines: {node: '>=12'} cpu: [x64] os: [win32] requiresBuild: true dev: false optional: true - /esbuild-windows-arm64/0.13.15: - resolution: {integrity: sha512-zzvyCVVpbwQQATaf3IG8mu1IwGEiDxKkYUdA4FpoCHi1KtPa13jeScYDjlW0Qh+ebWzpKfR2ZwvqAQkSWNcKjA==} + /esbuild-windows-arm64/0.14.25: + resolution: {integrity: sha512-4ype9ERiI45rSh+R8qUoBtaj6kJvUOI7oVLhKqPEpcF4Pa5PpT3hm/mXAyotJHREkHpM87PAJcA442mLnbtlNA==} + engines: {node: '>=12'} cpu: [arm64] os: [win32] requiresBuild: true dev: false optional: true - /esbuild/0.13.15: - resolution: {integrity: sha512-raCxt02HBKv8RJxE8vkTSCXGIyKHdEdGfUmiYb8wnabnaEmHzyW7DCHb5tEN0xU8ryqg5xw54mcwnYkC4x3AIw==} + /esbuild/0.14.25: + resolution: {integrity: sha512-4JHEIOMNFvK09ziiL+iVmldIhLbn49V4NAVo888tcGFKedEZY/Y8YapfStJ6zSE23tzYPKxqKwQBnQoIO0BI/Q==} + engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - esbuild-android-arm64: 0.13.15 - esbuild-darwin-64: 0.13.15 - esbuild-darwin-arm64: 0.13.15 - esbuild-freebsd-64: 0.13.15 - esbuild-freebsd-arm64: 0.13.15 - esbuild-linux-32: 0.13.15 - esbuild-linux-64: 0.13.15 - esbuild-linux-arm: 0.13.15 - esbuild-linux-arm64: 0.13.15 - esbuild-linux-mips64le: 0.13.15 - esbuild-linux-ppc64le: 0.13.15 - esbuild-netbsd-64: 0.13.15 - esbuild-openbsd-64: 0.13.15 - esbuild-sunos-64: 0.13.15 - esbuild-windows-32: 0.13.15 - esbuild-windows-64: 0.13.15 - esbuild-windows-arm64: 0.13.15 + esbuild-android-64: 0.14.25 + esbuild-android-arm64: 0.14.25 + esbuild-darwin-64: 0.14.25 + esbuild-darwin-arm64: 0.14.25 + esbuild-freebsd-64: 0.14.25 + esbuild-freebsd-arm64: 0.14.25 + esbuild-linux-32: 0.14.25 + esbuild-linux-64: 0.14.25 + esbuild-linux-arm: 0.14.25 + esbuild-linux-arm64: 0.14.25 + esbuild-linux-mips64le: 0.14.25 + esbuild-linux-ppc64le: 0.14.25 + esbuild-linux-riscv64: 0.14.25 + esbuild-linux-s390x: 0.14.25 + esbuild-netbsd-64: 0.14.25 + esbuild-openbsd-64: 0.14.25 + esbuild-sunos-64: 0.14.25 + esbuild-windows-32: 0.14.25 + esbuild-windows-64: 0.14.25 + esbuild-windows-arm64: 0.14.25 dev: false /escalade/3.1.1: @@ -1840,8 +1888,8 @@ packages: /ms/2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - /nanoid/3.2.0: - resolution: {integrity: sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==} + /nanoid/3.3.1: + resolution: {integrity: sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true dev: false @@ -1886,11 +1934,11 @@ packages: engines: {node: '>=8.6'} dev: true - /postcss/8.4.5: - resolution: {integrity: sha512-jBDboWM8qpaqwkMwItqTQTiFikhs/67OYVvblFFTM7MrZjt6yMKd6r2kgXizEbTTljacm4NldIlZnhbjr84QYg==} + /postcss/8.4.7: + resolution: {integrity: sha512-L9Ye3r6hkkCeOETQX6iOaWZgjp3LL6Lpqm6EtgbKrgqGGteRMNb9vzBfRL96YOSu8o7x3MfIH9Mo5cPJFGrW6A==} engines: {node: ^10 || ^12 || >=14} dependencies: - nanoid: 3.2.0 + nanoid: 3.3.1 picocolors: 1.0.0 source-map-js: 1.0.2 dev: false @@ -2072,8 +2120,8 @@ packages: engines: {node: '>=4'} dev: true - /vite/2.7.13: - resolution: {integrity: sha512-Mq8et7f3aK0SgSxjDNfOAimZGW9XryfHRa/uV0jseQSilg+KhYDSoNb9h1rknOy6SuMkvNDLKCYAYYUMCE+IgQ==} + /vite/2.8.6: + resolution: {integrity: sha512-e4H0QpludOVKkmOsRyqQ7LTcMUDF3mcgyNU4lmi0B5JUbe0ZxeBBl8VoZ8Y6Rfn9eFKYtdXNPcYK97ZwH+K2ug==} engines: {node: '>=12.2.0'} hasBin: true peerDependencies: @@ -2088,8 +2136,8 @@ packages: stylus: optional: true dependencies: - esbuild: 0.13.15 - postcss: 8.4.5 + esbuild: 0.14.25 + postcss: 8.4.7 resolve: 1.22.0 rollup: 2.66.1 optionalDependencies: diff --git a/src/index.ts b/src/index.ts index 9446759..24a5a33 100644 --- a/src/index.ts +++ b/src/index.ts @@ -265,7 +265,10 @@ export default function solidPlugin(options: Partial = {}): Plugin { const legacyAlias = normalizeAliases(userConfig.alias); if (!userConfig.resolve) userConfig.resolve = {}; - userConfig.resolve.alias = [...legacyAlias, ...normalizeAliases(userConfig.resolve?.alias)]; + userConfig.resolve.alias = [ + ...legacyAlias, + ...normalizeAliases(userConfig.resolve && userConfig.resolve.alias), + ]; // fix for bundling dev in production const nestedDeps = replaceDev @@ -302,7 +305,7 @@ export default function solidPlugin(options: Partial = {}): Plugin { }, async transform(source, id, transformOptions) { - const isSsr = transformOptions?.ssr; + const isSsr = transformOptions && transformOptions.ssr; const currentFileExtension = getExtension(id); const extensionsToWatch = [...(options.extensions || []), '.tsx', '.jsx'];