What is an easier way to add a directory-import plugin to the configuration? #898
-
I could only think of such working example, but it looks too scary import { defineConfig } from "wmr";
import directoryPlugin from "@wmrjs/directory-import";
export default function (config) {
directoryPlugin({
...config,
...defineConfig({
alias: {
react: "preact/compat",
"react-dom": "preact/compat",
},
}),
});
} |
Beta Was this translation helpful? Give feedback.
Answered by
rschristian
Jan 12, 2022
Replies: 1 comment
-
I'm not sure what you're meaning by "easier", but you can add the directory plugin like this: // wmr.config.mjs
import { defineConfig } from 'wmr';
import directoryPlugin from '@wmrjs/directory-import';
export default defineConfig((config) => ({
plugins: [directoryPlugin(config)]
})); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
rschristian
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not sure what you're meaning by "easier", but you can add the directory plugin like this: