Skip to content

Commit

Permalink
chore(#693): re-implement dev tools plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Decipher committed Aug 30, 2024
1 parent 88df379 commit d8b8ca6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
5 changes: 2 additions & 3 deletions packages/druxt/src/components/DruxtDevelTemplate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
v-text="label"
/>
</select>
<!-- @TODO - Re-implement this. -->
<!-- <button @click="onClick">
<button @click="onClick">
Create
</button> -->
</button>
</div>
</template>

Expand Down
21 changes: 10 additions & 11 deletions packages/druxt/src/nuxt/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,18 +189,17 @@ const DruxtNuxtModule = defineNuxtModule({

// Development mode features.
if (nuxt.options.dev) {
// @TODO - AddServerMiddleware isn't part of @nuxt/kit
// Add the template stubber server middleware.
// this.addServerMiddleware({
// path: '/_druxt/template',
// handler: 'druxt/dist/server-middleware/template.mjs'
// })

// // Add the Vue devtools plugin.
// this.addPlugin({
// src: resolve(__dirname, '../dist/plugins/devtools.mjs'),
// fileName: 'druxt-devtools.js'
// })
nuxt.options.serverMiddleware.push({
path: '/_druxt/template',
handler: 'druxt/dist/server-middleware/template.mjs'
})

// Add the Vue devtools plugin.
addPluginTemplate({
src: resolve(__dirname, '../dist/plugins/devtools.mjs'),
fileName: 'druxt-devtools.js'
})
}

// Nuxt Storybook.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ exports[`DruxtEntity missing schema 1`] = `
<option>DruxtEntityFileFile</option>
<option>DruxtEntityFile</option>
<option>DruxtEntityDefault</option>
</select></div>
</select> <button>
Create
</button></div>
<details>
<summary>JSON:API resource</summary><pre><code>{
"type": "file--file",
Expand Down

0 comments on commit d8b8ca6

Please sign in to comment.