Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] webpack4 升级后项目启动不了 #2743

Closed
XIGUATANG opened this issue May 9, 2018 · 10 comments
Closed

[Bug Report] webpack4 升级后项目启动不了 #2743

XIGUATANG opened this issue May 9, 2018 · 10 comments

Comments

@XIGUATANG
Copy link

VUX version

2.9.1-rc.1

OS/Browsers version

Mac Os 10.13.4 / Chrome 67.0.

Vue version

2.5.16

Code

const VueLoaderPlugin = require('vue-loader/lib/plugin'); 
  plugins: [
    // make sure to include the plugin!
    new VueLoaderPlugin()
  ]
module.exports = vuxLoader.merge(webpackConfig, {
  plugins: ['vux-ui']
})

Steps to reproduce

Module parse failed: Unexpected token (3:0)
You may need an appropriate loader to handle this file type.
| import { render, staticRenderFns } from "./App.vue?vue&type=template&id=7ba5bd90"
| import script from "./App.vue?vue&type=script&lang=js"
| ../node_modules/vux-loader/src/script-loader.js!export * from "./App.vue?vue&type=script&lang=js"
| import style0 from "./App.vue?vue&type=style&index=0&lang=scss"
|

@ ./src/main.js 2:0-24 23:13-16
@ multi (webpack)-dev-server/client?http://10.101.152.156:8086 webpack/hot/dev-server ./src/main.js

.

What is Expected?

提供解决方案 项目顺利升级webpack4

What is actually happening?

不能启动 报错如重现步骤

@tangMr1234
Copy link

tangMr1234 commented May 11, 2018

我升级的时候提示webpack4缺少了webpack-cli,安装了cli就能正常打开,但是报vue-loader的错误,后来看package.json里vue-loader被升级到了v15, https://vue-loader.vuejs.org/migrating.html 这里有写从14以下迁移到15需要安装什么,不知道你是不是和我同一个问题

@wpnl
Copy link

wpnl commented May 25, 2018

请问解决了吗,我也遇到了一样的问题,
vue-cli3.x应该如何正确的去引入vux??

@chenchengfa93
Copy link

chenchengfa93 commented Jun 1, 2018

我在正常使用的项目引入vux-loader时,也出现了这样的报错,并且项目无法启动,项目使用包版本如下

webpack version

4.9.1

vux-loader version

1.2.9

vue-loader version

15.2.1

新增的Code

const vuxLoader = require('vux-loader');

const vuxConfig = vuxLoader.merge(config, {
  plugins: ['vux-ui']
});

// export default config;
export default vuxConfig;

辛苦大大们帮忙看一下啦,目前暂时使用babel-plugin-import,体验不是很好

@Rainpia
Copy link

Rainpia commented Jun 1, 2018

一样的问题,webpack4,vue2.5项目,集成 vux,同求解

@chenchengfa93
Copy link

做了一些尝试,并不是webpack4的原因,将vue-loader从15改为14的就能正常使用了

@NoraGithub
Copy link

可以解决下吗?

@Jiiiiiin
Copy link

mark 大家去看看vux-loader

@zzc5464
Copy link

zzc5464 commented Nov 10, 2018

webpack 4 vux 2.6.5 vue2.5.2 只要引入vux就报错

const vuxLoader = require('vux-loader')
module.exports = vuxLoader.merge(webpackConfig, {
plugins: ['vux-ui']
})

@fengerzh
Copy link

把vue-loader的依赖降至14.0.0即可。注意:是vue-loader,不是vux-loader。

@caozhong1996
Copy link
Collaborator

see #3778

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants