setup proxy for dev
This commit is contained in:
parent
8bacb8406e
commit
5614ed542a
@ -10,6 +10,16 @@ export default defineNuxtConfig({
|
||||
preset: "static"
|
||||
},
|
||||
vite: {
|
||||
server: {
|
||||
proxy: {
|
||||
"^/node_modules/.*": {
|
||||
target: "http://localhost:3000",
|
||||
changeOrigin: true,
|
||||
rewrite: (path) =>
|
||||
path.replace(/^\/node_modules\//, "/_nuxt/node_modules/")
|
||||
}
|
||||
}
|
||||
},
|
||||
$client: {
|
||||
plugins: [
|
||||
topLevelAwait({
|
||||
|
@ -2,10 +2,19 @@
|
||||
<div>
|
||||
<h1>rmt/pages/contact/properties.vue</h1>
|
||||
<div>Contact prop</div>
|
||||
<div>
|
||||
<button type="button" @click="handleClick">Click: {{ counter }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
const counter = ref(0)
|
||||
|
||||
const handleClick = () => {
|
||||
counter.value += 2
|
||||
}
|
||||
|
||||
definePageMeta({
|
||||
name: "contact1"
|
||||
name: "contact-properties"
|
||||
})
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user