質問編集履歴
6
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -153,3 +153,125 @@
|
|
153
153
|
|
154
154
|
|
155
155
|
よろしくお願いいたします。
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
**追記**
|
160
|
+
|
161
|
+
---
|
162
|
+
|
163
|
+
すみません、書き忘れていましたがapp.jsにコードを書いてnpm run dev実行はしておりました。
|
164
|
+
|
165
|
+
しかし下記のようなエラーがconsoleにて出力されます
|
166
|
+
|
167
|
+
```
|
168
|
+
|
169
|
+
[Vue warn]: Cannot find element: #app
|
170
|
+
|
171
|
+
(index):281 Uncaught ReferenceError: Vue is not defined
|
172
|
+
|
173
|
+
```
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
app.jsのコードはこちらです
|
178
|
+
|
179
|
+
```
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
/**
|
184
|
+
|
185
|
+
* First we will load all of this project's JavaScript dependencies which
|
186
|
+
|
187
|
+
* includes Vue and other libraries. It is a great starting point when
|
188
|
+
|
189
|
+
* building robust, powerful web applications using Vue and Laravel.
|
190
|
+
|
191
|
+
*/
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
import Vue from 'vue'
|
196
|
+
|
197
|
+
import VueRouter from 'vue-router'
|
198
|
+
|
199
|
+
import VuePassword from 'vue-password'
|
200
|
+
|
201
|
+
Vue.use(VueRouter)
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
require('./bootstrap');
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
// window.Vue = require('vue');
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
/**
|
214
|
+
|
215
|
+
* Next, we will create a fresh Vue application instance and attach it to
|
216
|
+
|
217
|
+
* the page. Then, you may begin adding components to this application
|
218
|
+
|
219
|
+
* or customize the JavaScript scaffolding to fit your unique needs.
|
220
|
+
|
221
|
+
*/
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
Vue.component('navbar', require('./components/layouts/navbar.vue'));
|
226
|
+
|
227
|
+
Vue.component('example-component', require('./components/ExampleComponent.vue'));
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
const about_us = { template: '<div>About us!</div>' }
|
236
|
+
|
237
|
+
const blog = { template: '<div>bloooog</div>' }
|
238
|
+
|
239
|
+
const contact = { template: '<div>contakttt</div>' }
|
240
|
+
|
241
|
+
const login = { template: '<div>loginnn</div>' }
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
//ルートの設定
|
246
|
+
|
247
|
+
const router = new VueRouter({
|
248
|
+
|
249
|
+
mode: 'history',
|
250
|
+
|
251
|
+
routes :[
|
252
|
+
|
253
|
+
{ path: '/about_us', component: require('./components/ExampleComponent.vue') },
|
254
|
+
|
255
|
+
{ path: '/blog', component: blog },
|
256
|
+
|
257
|
+
{ path: '/contact', component: contact },
|
258
|
+
|
259
|
+
{ path: '/login', component: login }
|
260
|
+
|
261
|
+
]
|
262
|
+
|
263
|
+
});
|
264
|
+
|
265
|
+
const app = new Vue({
|
266
|
+
|
267
|
+
router
|
268
|
+
|
269
|
+
}).$mount('#app')
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
```
|
276
|
+
|
277
|
+
よろしくお願いいたします。
|
5
題名の変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
npm installで追加したmoduleをうまく読み込めない,
|
1
|
+
CDN読み込みではうまくいくが, npm installで追加したmoduleをうまく読み込めない,(Laravel5.5)
|
test
CHANGED
File without changes
|
4
題名の変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
npm installで追加したmoduleをうまく読み込めない(Laravel5.5)
|
1
|
+
npm installで追加したmoduleをうまく読み込めない,CDN読み込みではうまくいくが。。(Laravel5.5)
|
test
CHANGED
File without changes
|
3
題名の変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
npm installで追加したmoduleをうまく読み込めない(Laravel5.5)
|
test
CHANGED
File without changes
|
2
題名の変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Laravel5.5
|
1
|
+
(Laravel5.5) npm installで追加したmoduleをうまく読み込めない
|
test
CHANGED
File without changes
|
1
題名の変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Laravel5.5にてvue-routerが読み込まれない
|
1
|
+
Laravel5.5にてvue-router・requireが読み込まれない
|
test
CHANGED
File without changes
|