Closed Muurilo closed 2 years ago
Absolutely! I've added some more docs in the README for now: https://github.com/danielroe/magic-regexp/commit/45cba2653052b54dc49642b3418733d55b82b439. What do you think is particularly missing at the moment? Examples?
@danielroe Thanks for your work! I would like to know how to use this in a project ? I tried to use it but got errors in my Laravel+Vite+Vue project:
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/hassan/project/node_modules/.pnpm/magic-regexp@0.2.1_vite@3.0.1/node_modules/magic-regexp/dist/transform.mjs not supported.
Does this tool only work in specific environment ?
@HassanZahirnia Currently you can only import it in an ESM context. What does your vite config look like? Is it written in CJS or ESM?
@HassanZahirnia Currently you can only import it in an ESM context. What does your vite config look like? Is it written in CJS or ESM?
I believe it's ESM
Here is a portion of my vite.config.ts
:
import { defineConfig } from 'vite'
import laravel, { callArtisan, findPhpPath } from 'vite-plugin-laravel'
import vue from '@vitejs/plugin-vue'
import Components from 'unplugin-vue-components/vite'
import AutoImport from 'unplugin-auto-import/vite'
import inertiaLayout from './resources/js/inertia/layout'
import DefineOptions from 'unplugin-vue-define-options/vite'
export default defineConfig({
optimizeDeps: {
include: [
// ... omitted for cleaner example
]
},
plugins: [
AutoImport({
// ... omitted for cleaner example
}),
inertiaLayout(),
vue(),
DefineOptions(),
// ... omitted for cleaner example
@HassanZahirnia Would you provide a reproduction and open a new issue? đ I can't reproduce it with a Vite 3 project following the instructions in the README.
@HassanZahirnia Would you provide a reproduction and open a new issue? đ I can't reproduce it with a Vite 3 project following the instructions in the README.
Here #11
đ Your use case
creating project documentation, documentation even at the beginning of the project is important for more people to test and give more ideas and get feedback from the community.
đ The solution you'd like
Vitepress, is powerful and can be easily implemented.
đ Alternatives you've considered
No response
âšī¸ Additional info
No response