Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See :// webpack . js .org/concepts#loaders
> <template>
| <div class="container">
| <div class="row justify-content-center">
@ ./resources/js/Router.js 4:0-53 11:15-19
@ ./resources/js/app.js
@ multi ./resources/js/App.js ./resources/sass/app.scss在APP要求中(‘./bootstrap’);
window.Vue = require('vue');
import VueRouter from 'vue-router'
Vue.use(VueRouter)
import router from './Router'
new Vue({
el: '#app',
router
});在路由器js中
我导入vue -路由器和vue
从' Vue‘导入VueRouter,从’vue-路由器‘Vue.use(VueRouter)导入vue
从'./components/ExampleComponent.Vue‘Vue.use(VueRouter)导入用户;const路由器=新的VueRouter({模式:’历史‘,路由:{ path:'/ User ',组件: User,},{path:’/类别‘,组件:类别,} })
发布于 2020-11-24 13:33:13
我也遇到了这个错误。在我自己的例子中,我遇到了这个错误,因为我想使用顺风2.0。
我认为这与LaravelMixV6.0或POSTCSS8有关。因为Vue SFCs还没有使用POSTCSS 8的插件。取自(https://github.com/JeffreyWay/laravel-mix/issues/2625)。
因此,在我自己的例子中,我所采取的步骤如下。
我卸载了相关的软件包-- npm uninstall tailwindcss postcss autoprefixer
npm install tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9重新安装了它们
检查https://tailwindcss.com/docs/installation#post-css-7-compatibility-build
"laravel-mix": "^5.0.1",将laravel的混合度从v6.0降至V5.0.1。。
npm install
最后,npm run watch
https://stackoverflow.com/questions/64161764
复制相似问题