Webpack

webpack-cli Unknown argument: --output

允我心安 提交于 2021-01-05 09:12:58
问题 My npm, node js versions: When I try to run the npm dev command: The log file: 0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'dev' ] 2 info using npm@6.14.8 3 info using node@v14.15.0 4 verbose run-script [ 'predev', 'dev', 'postdev' ] 5 info lifecycle winteka@1.0.0~predev: winteka@1.0.0 6 info lifecycle winteka@1.0.0~dev: winteka@1.0.0 7 verbose lifecycle winteka@1.0.0~dev: unsafe-perm in lifecycle true 8 verbose lifecycle winteka@1.0

vue

跟風遠走 提交于 2021-01-05 09:09:17
计算属性 computed:{} <! DOCTYPE html > < html > < head > < title ></ title > </ head > < body > < div id ="computed" > < div > <!-- dlrow olleh --> <!-- {{msg.split('').reverse().join('')}} --> {{reverseStr}} </ div > < button @click ='clickHanlder' > 修改 </ button > </ div > < script type ="text/javascript" src ="./vue.js" ></ script > < script type ="text/javascript" > var com = new Vue({ el: " #computed " , data:{ msg: " hello world " }, methods:{ clickHanlder(){ console.log( this .reverseStr); // get this .reverseStr = " Hello Luffy " // set } }, computed:{ // 默认只有 getter 方法 // 计算数据属性 watch 监听

TypeError: Cannot read property '0' of undefined Webpack

我是研究僧i 提交于 2021-01-05 07:57:41
问题 I'm trying to create a demo of ant-design for that I've installed ant-design and now when I'm hitting npm start I got this error dora: listened on 8000 📦 1/2 build modules/opt/lampp/htdocs/antddemo/node_modules/webpack/lib/ExternalModuleFactoryPlugin.js:19 const dependency = data.dependencies[0]; ^ TypeError: Cannot read property '0' of undefined at /opt/lampp/htdocs/antddemo/node_modules/webpack/lib/ExternalModuleFactoryPlugin.js:19:40 at /opt/lampp/htdocs/antddemo/node_modules/atool-build

TypeError: Cannot read property '0' of undefined Webpack

℡╲_俬逩灬. 提交于 2021-01-05 07:57:14
问题 I'm trying to create a demo of ant-design for that I've installed ant-design and now when I'm hitting npm start I got this error dora: listened on 8000 📦 1/2 build modules/opt/lampp/htdocs/antddemo/node_modules/webpack/lib/ExternalModuleFactoryPlugin.js:19 const dependency = data.dependencies[0]; ^ TypeError: Cannot read property '0' of undefined at /opt/lampp/htdocs/antddemo/node_modules/webpack/lib/ExternalModuleFactoryPlugin.js:19:40 at /opt/lampp/htdocs/antddemo/node_modules/atool-build

Webpack配置区分开发环境和生产环境

*爱你&永不变心* 提交于 2021-01-05 07:31:33
  在项目开发的时候,我们通常会将程序分为开发环境和生产环境(或者叫线上环境),开发环境通常指的是我们正在开发的这个阶段所需要的一些环境配置,也就是方便我们开发人员调试开发的一种环境;生产环境通常指的是我们将程序开发完成经过测试之后无明显异常准备发布上线的环境,也可以理解为用户可以正常使用的就是生产环境;   当然开发环境和生产环境在配置方面的需求是不一样的,但是有共同点:   开发环境的需求:      模块热更新 (本地开启服务,实时更新)     sourceMap (方便打包调试)     接口代理  (配置proxyTable解决开发环境中的跨域问题)     代码规范检查 (代码规范检查工具)   生产环境的需求:     提取公共代码         压缩混淆(压缩混淆代码,清除代码空格,注释等信息使其变得难以阅读)     文件压缩/base64编码(压缩代码,减少线上环境文件包的大小)     去除无用的代码   开发环境和生产环境的共同需求:     同样的入口     同样的代码处理(loader处理)     同样的解析配置     在我们搭建好Vue-cli脚手架之后,我们的build文件夹会分别自动的生成webpack.base.conf.js、webpack.dev.conf.js、webpack.prod.conf.js三个webpack配置文件;

npm run dev 出现警告

跟風遠走 提交于 2021-01-04 04:49:53
1 WARNING in ./node_modules/_webpack@3.10.0@webpack/buildin/ global.js 2 There are multiple modules with names that only differ in casing. 3 This can lead to unexpected behavior when compiling on a filesystem with other case - semantic. 4 Use equal casing. Compare these module identifiers: 5 * E:\Project\webpack\node_modules\_webpack@3.10.0 @webpack\buildin\global.js 6 Used by 1 module(s), i. e. 7 E:\Project\webpack\node_modules\_sockjs-client@1.1.4@sockjs- client\dist\sockjs.js 8 * e:\Project\webpack\node_modules\_webpack@3.10.0 @webpack\buildin\global.js 9 Used by 1 module(s), i. e. 10 e:

那些年与面试官交手过的HTTP问题

北战南征 提交于 2021-01-03 07:21:42
这是前端食堂的第25篇原创 「观感度:🌟🌟🌟🌟🌟」 「口味:剁椒鱼头」 「烹饪时间:20min」 本文已收录在 Github ,https://github.com/Geekhyt/front-end-canteen,感谢Star。 从淡黄的长裙和蓬松的头发我察觉到,面前坐着的这位女面试官属实是有点东西。我的自我介绍也变得声情并茂起来。Skr~~~ 在此期间,小姐姐面无改色的看着我的简历。不过无所谓,这些都不重要。 还是咱们的原定计划,把面试官引到了咱们最擅长的领域。 你觉得自己最擅长的是什么? HTTP 协议吧,我还算比较了解。 0.那你说一下OSI 网络分层模型是怎样分层的? 应用层、表示层、会话层、传输层、网络层、数据链路层、物理层 application layer、presentation layer、session layer、transport layer、network layer、data link layer、physical layer 1.TCP/IP 网络分层模型是怎样分层的? 应用层、传输层、网际层、链接层 application layer、transport layer、internet layer、link layer 2.TCP 和 UDP 区别? TCP 和 UDP 都是传输层的协议,但二者有着截然不同的基因。 TCP: 面向连接 面向字节流

TypeScript import with extension

こ雲淡風輕ζ 提交于 2021-01-03 06:38:04
问题 You may have heard of Deno which is a new TypeScript runtime. One major difference between Deno and normal TypeScript is that you must include the file extension in the import statement. e.g: import foo from './bar.ts' ^^ I would like to write code that is compatible with both Deno and Webpack. How can I configure Webpack to allow importing with .ts extension like above? Also, how can I prevent the following VSCode error? 回答1: Webpack can be configured to resolve the extensions of all imports

Springboot+shiro+mybatis-plus+vue前后端分离项目设计架构

前提是你 提交于 2021-01-02 11:06:14
目录 前言 一、后端项目 1、系统架构设计 2、技术细节 1)、构建模块分层 2)、模块之间引用 3)、mybatis-plus配置和引入 4)、mybatis-plus分页插件 5)、代码生成器,代码里有注释 6)、shiro框架引入 二、前端项目 1、系统架构设计 2、技术细节 前言 根据公司要求,搭建个前后端分离的权限系统,根据目前技术技术水平,采用以下技术栈开发,以此写一份博客记录下构架的系统框架,同时希望能帮助因搭建系统架构不怎么会的小伙伴们,废话不多说,直接列出技术栈: 前端项目: Vue2.x+element全家桶+webpack+node+vue-admin ,开发工具:HBuilderx 后端项目 :Springboot2.x+shiro+mybatis-plus+mysql, 开发工具:IDEA 一、后端项目 1、系统架构设计 采用主流分层多模块开发,如下图所示 2、技术细节 1)、构建模块分层 App(app请求接口全部在这里),Web(web请求接口全部在这里)、Dao(数据层)、Model(抽象数据层)、Service(业务层)、Common(所有通用工具在这里,任何模块接口访问) 2)、模块之间引用 如下图所示: 3)、mybatis-plus配置和引入 Model模块引入maven,然后再web模块resources资源文件下的application

Using webpack to prepend variables for SCSS

一个人想着一个人 提交于 2021-01-02 06:55:07
问题 Webpack amateur here... I'm trying to incorporate a theme.scss file to customize the theme used by React Toolbox by following the directions specified here, namely: If you are using Webpack as module bundler, you are probably using sass-loader as well. What we want to do is to prepend to each SASS file compilation a bunch of variables to override and this can be done with the data option. For example: sassLoader: { data: '@import "' + path.resolve(__dirname, 'theme/_theme.scss') + '";' } In