This repository has been archived by the owner on Jan 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
vue-loader的style错误 #13
Comments
此外,还想请教一下,admin您是用了异步加载的模式,异步的chunk里面css其实没有分离出来,如何将异步加载的chunk里面也进行css提取分离出来。等于我打开admin/page1.html,就会加载对应的page1.js和page1.css;打开admin/page2.html,就会加载对应的page2.js和page2.css;这能实现吗?或者可以大致告诉一下思路吗? |
很高兴能得到回答,第一个问题我会定位一下什么问题。 |
我发现一个问题,在router使用require.ensure做异步加载,是可以拿到chunkName的,但是通过import,如:component: () => import(/* webpackChunkName: "page" */ './view/page/page.vue'),在打包的时候,[name]是无法拿到的。get static/js/1.c7af45c.js . |
这个问题, 我也很早发现了, 一直找不到原因, 所以放弃了... |
@yiqianglin 这个原因应该是找到了, 删除 .babelrc 里的 comments: false 这个配置 或设置成true |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
ERROR in ./src/components/ProgressBar.vue?vue&type=style&index=0&id=5734e3c6&scoped=true&lang=css (./node_modules/_vue-loader@15.0.1@vue-loader/lib/loaders/stylePostLoader.js!./node_modules/_vue-style-loader@4.1.0@vue-style-loader!./node_modules/_css-loader@0.28.11@css-loader??ref--6-oneOf-0-1!./node_modules/_vue-loader@15.0.1@vue-loader/lib??vue-loader-options!./src/components/ProgressBar.vue?vue&type=style&index=0&id=5734e3c6&scoped=true&lang=css)
Module build failed: CssSyntaxError:
dev编译时,ProgresressBar.vue里面style报错,这个怎么解决?
另外,dev-server.js的html-webpack-plugin-after-emit报cb未定义。小提示
The text was updated successfully, but these errors were encountered: