webpack
cominglately
时间过得好快 ...
勉力前行
展开
-
webpack 常用的loader
场景. webpack 只能识别出javascript文件 对于其他的类型的文件可以通过使用loader转成webpack可以处理的 模块常用的模块npm install css-loader style-loader babel-core babel-loader babel-plugin-transform-runtime babel-preset-es2015 babe...原创 2018-06-03 08:58:57 · 1016 阅读 · 1 评论 -
webpack4.10.2 配置babel(使用ES6的语法)
场景. ES6的语法很讨喜 最喜欢import ,所以需要配置在webpack中配置. webpack.config.js { // 这样可以使用ES6的语法 test: /\.js$/, use: [ { ...原创 2018-06-03 10:02:54 · 491 阅读 · 0 评论 -
webpack2.4.* 加载loader的两种方式
场景 webpack加载loader 一般有两种方式 配置文件配置 在入口文件加载特定文件时制定 ShowTime 配置文件 { test: /\.css$/, use: [ {loader...原创 2018-06-03 10:35:54 · 247 阅读 · 0 评论 -
webpack vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin
场景. webpack2.4.*集成vue-loader@15.2.4报错 vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config.分析. 参考官方文档 https://vue-loader.vuejs....原创 2018-06-03 11:26:10 · 41192 阅读 · 36 评论 -
webpack 加载vue组件webpack You are using the runtime-only build of Vue where the template compiler is no
场景. webpack 加载vue进行开发的时候, 曝出这样错误 webpack You are using the runtime-only build of Vue where the template compiler is not available. webpack的配置情况是 { test : /\.vue$/...原创 2018-06-04 19:56:07 · 5082 阅读 · 0 评论 -
webpack2.4.* vue-loader@15.2.4 加载required的时候报错Failed to mount component: template or render funct
场景. webpack2.4.* vue-loader@15.2.4在Vue.comment使用require的时候报错 注册组件 Vue.component(‘Heading’, require(‘./components/heading.vue’)); 报错的内容 Failed to mount component: t...原创 2018-06-04 23:26:29 · 1506 阅读 · 0 评论 -
webpack2.4.* 常用的一些loader
场景. webpack 常用的一些loader和配置webpack常用的loadernpm install css-loader style-loader babel-core babel-loader babel-plugin-transform-runtime babel-preset-es2015 babel-preset-stage-0 babel-runtime...原创 2018-06-04 23:34:37 · 276 阅读 · 0 评论 -
webpack 开启热加载
场景. 开发中的良药,自动加载分析 这里面有个误区,webpack和webpack-dev-serve 加载的bundle.js 是两个不同的概念 webpack的bundle.js是可以在webpack.config.js中指定的 webpack-dev-server的bundle.js是在内存中的 一定要在index.html指定...原创 2018-06-05 21:00:54 · 3461 阅读 · 0 评论 -
webpack One CLI for webpack must be installed. These are recommended choices, delivered as separate
场景. 安装webpack的时候 遇到的情况; 直接按照提示安装 提示Module webpack-cli 不存在 One CLI for webpack must be installed. These are recommended choices, delivered as separate packages: - webpack-cli (https://github...原创 2018-06-01 23:03:37 · 32411 阅读 · 4 评论