zdying / hiipack Goto Github PK
View Code? Open in Web Editor NEWhiipack is a front end development tool based on webpack.
License: MIT License
hiipack is a front end development tool based on webpack.
License: MIT License
我的VUE工程目前已经完美运行在hii下啦,撒花~~
目前发现的一个问题是,当我执行hii pack时,发现css被压缩了
config里关于vue的配置如下:
vue: {
loaders: {
vue: 'babel-loader?presets[]=' + __hiipack__.resolve('babel-preset-es2015-loose')
+ '&plugins[]=' + __hiipack__.resolve('babel-plugin-transform-runtime') + '&comments=false',
css: ExtractTextPlugin.extract('vue-style-loader', 'css!sass'),
sass: ExtractTextPlugin.extract('vue-style-loader', 'css!sass'),
scss: ExtractTextPlugin.extract('vue-style-loader', 'css!sass')
}
}
hii min 报错
hii start运行正常
报错信息如下:
[info] client - clean folder [ prd, ver ] ...
[info] Compiler - compiling [ lib.js ] ...
[info] Compiler - compile finished ( 2933ms )
[info] Compiler - compiling [ orderDetail/app.js ] ...
[info] Compiler - compile finished ( 486ms )
compile result:
Hash: 861ec26824f86f50dc52b6f758527704
Version: webpack 1.13.2
Time: 486ms
ERROR in ./src/orderDetail/app.js
Module build failed: Error: Cannot find module 'babylon' (While processing preset: "/Users/huazihear/workspace/hotdog/touch_hotdog_react/node_modules/.npminstall/babel-preset-es2015/6.16.0/babel-preset-es2015/lib/index.js")
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/Users/huazihear/workspace/hotdog/touch_hotdog_react/node_modules/.npminstall/babel-traverse/6.16.0/babel-traverse/lib/path/replacement.js:28:16)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
[error] Server - ENOENT: no such file or directory, stat '/example/path/index.htmlfavicon.ico'
使用hii min打包文件之后,文件中有大量的类似"production"!==t.env.NODE_ENV 的判断,这个点是必须的无法避免的还是可以优化的部分。
日志如下
hiipack proxy file file:///var/folders/r9/pyf_2pnn67lchv0jsq3wxxjm0000gn/T/hiipack_cache/hiipack.pac
[error] proxy -> Server - ENOENT: no such file or directory, open '/var/folders/r9/pyf_2pnn67lchv0jsq3wxxjm0000gn/T/hiipack_cache/hiipack.pac'
大概是临时目录被清空了,找不到文件
hosts可以考虑放在全局代理,放在具体工程里感觉意义不大了,并且多个工程还有可能冲突
rewrite支持全局设置proxy_set_header Host $onlineDomain;此时如果在某条规则下设置局部的proxy_set_header,会被全局覆盖,正常逻辑是局部设置覆盖全局设置吧
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.