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