0

It's the strangest phenomenon that I am experiencing now. I have been creating a few components for my application (Using Laravel Jetstream, Inertia Stack) so I am using VueJS. Everything is going fine and then I make a new comonent in the same folder as other components that are building but the new component I make just doesn't build at all, yarn watch doesn't see it, and npm run prod doesn't see it.

Here's my tree:

resources
--+js
-----+Components
------ComponentOne.vue (builds)
------ComponentTwo.vue (builds)
------ComponentThree.vue (builds)
---------+Folder
----------ComponentFour.vue (builds)
----------ComponentFive.vue (builds)
----------NewComponent.vue (doesn't build)

Now, even if I just duplicate a component and change the name a little it won't even see it and build.

This happened to a couple of other files, which just seem to be ignored and I've just left them and made new files the next day which worked in a different folder.

Here is my Webpack:

const path = require('path');
const Dotenv = require('dotenv-webpack');

module.exports = {
     plugins: [
        new Dotenv()
    ],
    resolve: {
        alias: {
            '@': path.resolve('resources/js'),
        },

    },
};

App.js

createApp({
    render: () =>
        h(InertiaApp, {
            initialPage: JSON.parse(el.dataset.page),
            resolveComponent: (name) => require(`./Pages/${name}`).default,
        }),
})
    .mixin({ methods: { route } })
    .use(InertiaPlugin)
    .mount(el);

Any ideas?

Tim Rowley
  • 420
  • 4
  • 15

1 Answers1

0

Nevermind...

I didn't realize that the component had to be referenced in another page or component to be built. I thought I had but it hadn't imported correctly.

Tim Rowley
  • 420
  • 4
  • 15