Skip to content

Commit

Permalink
🔥 Remove config merging (fix #20)
Browse files Browse the repository at this point in the history
  • Loading branch information
amoutonbrady committed Oct 2, 2021
1 parent 10437ad commit f3b10b5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions playground/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
import solid from 'vite-plugin-solid';
import { defineConfig } from 'vite';

/**
* @returns {import('vite').Plugin}
*/
const logPlugin = () => {
return {
name: 'looog',
configResolved(config) {
console.log({ alias: config.resolve.alias });
},
};
};

export default defineConfig({
plugins: [
solid({
babel: {
plugins: ['@babel/plugin-syntax-top-level-await'],
},
}),
logPlugin(),
],
resolve: {
alias: {
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default function solidPlugin(options: Partial<Options> = {}): Plugin {
'solid-js/h',
];

return mergeAndConcat(userConfig, {
return {
/**
* We only need esbuild on .ts or .js files.
* .tsx & .jsx files are handled by us
Expand All @@ -150,7 +150,7 @@ export default function solidPlugin(options: Partial<Options> = {}): Plugin {
optimizeDeps: {
include: nestedDeps,
},
}) as UserConfig;
} as UserConfig;
},

configResolved(config) {
Expand Down

0 comments on commit f3b10b5

Please sign in to comment.