我正在尝试在一个laravel mix项目中使用库(使用typescript)。但我一直收到错误Uncaught TypeError: Class constructor VuexModule cannot be invoked without 'new'。这似乎是一个,可以通过将transpileDependencies: ['vuex-module-decorators']添加到我的vue.config.js文件中来解决,这将告诉babel转译该包。
因为我使用的是laravel mix,所以添加一个vue.config.js文件不会做任何事情。我不知道如何
我试图在Laravel项目上运行npm run dev,但是我得到了以下错误。
错误:找不到模块'/home/faramarz/todo/node_modules/laravel-mix/setup/webpack.config.js‘
是的,节点-模块/ dir中没有这样的文件。但我运行npm install没有任何问题。我还运行了npm i laravel-mix,但它没有安装它。
package.json
{
"private": true,
"scripts": {
"dev": "npm run deve
如果我使用webpack和Laravel,我应该如何包括WebPack插件?我搞不懂我在哪个文件中添加了插件代码。
我下面的尝试似乎没有运行我的插件。插件应该压缩js,css文件,但它不是。
webpack.config.js
require('./node_modules/laravel-mix/src/index');
require(Mix.paths.mix());
// My plugin is here
const CompressionPlugin = require('compression-webpack-plugin');
我是Vue的新手,但我想在最近的一个项目中尝试一下,我能理解为什么它会被喜欢。无论如何,一切都很好,直到我转到IE,那里什么都没有工作。
对于Object doesn't support property or method 'assign'这样的错误,我给了它一个谷歌,显然IE不太支持ES6,根据这个问题:
所以,我听说过Babel,它看起来像一种可以完成这项工作的东西,因为它能够从ES6转换。在此之后,我尝试将Babel集成到我的Laravel项目中。
我更新了我的webpack.min.js如下:
let mix = require('laravel-mi
我需要运行"npm run dev“,以便在Laravel 5.8 web应用程序中更新bootstrap和jquery,但它不断地生成以下错误... (node:4758) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, lstat 'xxx/xxx/xxx/node_modules/admin-lte/bootstrap'
at Object.lstatSync (fs.js:1115:3)
at Object.lstatSync (xxx/xx