Comments (11)
release 不能设置成 false
在 2015年7月3日,下午4:40,Hanai [email protected] 写道:
// test.tpltest
fis.match('*.tpl', {
release: false,
isHtmlLike: true
});
错误信息[ERROR] unreleasable file [/Users/hanai/WebstormProjects/fis3-demo/use-amd/test.tpl]
—
Reply to this email directly or view it on GitHub #28.
from fis3.
@xiangshouding 如果要设置某些文件或者文件夹不输出到output
目录要怎么配置,而且Demo的配置里有设置release为false的情况
from fis3.
fis.match('*', {
deploy: [function (options, modified, total, next)) {
modified = modified.filter(function(file) {
if (file.needCompileButNotRelease) {
return false;
}
return true;
});
next(); // 别忘了 next();
}, fis.plugin('local-deliver', {})]
});
fis.match('*.not.release.js', {
needCompileButNotRelease: true
});
后续我造一个某些文件想编译但是不想产出的deploy
,你先用这个将就着用。
from fis3.
@calledT 但可能这块有个误解;
{
release: false
}
设置时,按照我们的当初的想法,都不发布了还进入编译是不合理的。进入编译的文件应该都发布。
后来很多用户反应,文件已经被打包到某个其他文件里去了,为啥还要产出。文件已经内嵌掉了为啥还要产出,所以跟一些理念冲突了。
不过我们依然觉着即使文件已经被打包了、被合并了那个文件也应该被产出。所以 release: false
依然无法做到编译但不产出。
所以需要经过 deploy 阶段进行筛选,把我需要在编译阶段出现但是不想产出的文件删掉不让它产出。
from fis3.
不过我们正在研讨这个事情,可能会让 { release: false }
的资源进入编译但不产出。
from fis3.
release: false
我这是能被 inline 的啊,是否 fis3 的版本不是最新的导致的?我刚按你的 demo 测试了一把,没有这个 error 出现。
from fis3.
@2betop
哦,我又测试了下,看我的详细配置
fis.match('*.tpl', {
release: false
});
// 以下
// npm install [-g] fis3-hook-module
fis.hook('module', {
mode: 'amd'
});
fis.match('/comp/**/*.js', {
isMod: true, // 设置 comp 下都是一些组件,组件建议都是匿名方式 define
release: '/static/$0'
});
fis.match('::package', {
// npm install [-g] fis3-postpackager-loader
// 分析 __RESOURCE_MAP__ 结构,来解决资源加载问题
postpackager: fis.plugin('loader', {
resourceType: 'amd',
useInlineMap: true // 资源映射表内嵌
})
});
单独只有 *.tpl 的规则没有问题,加了后面的内容才会有这个错误
[ERROR] unreleasable file [/Users/hanai/WebstormProjects/fis3-demo/use-amd/test.tpl]
from fis3.
哈哈,复现了。请更新 fis3-postpackager-loader 插件
from fis3.
modified = modified.filter(...)
是不会起作用的...并未修改原modified的引用
from fis3.
嗯,正确的姿势应该是 modified.splice(index, 1);
from fis3.
fis.match('*', {
deploy: [function (options, modified, total, next)) {
modified = modified.filter(function(file) {
if (file.needCompileButNotRelease) {
return false;
}
return true;
});
next(); // 别忘了 next();
}, fis.plugin('local-deliver', {})]
});
fis.match('*.not.release.js', {
needCompileButNotRelease: true
});
请问这个问题是否有方便的写法?比如不标示是否是release,只要是inline的文件,就不release。
或者写插件应该在什么位置写?
from fis3.
Related Issues (20)
- 就告诉我作者是不是跑路了? HOT 2
- fis.match不能调用parser自定义方法
- _handle.Pngquant is not a constructor HOT 3
- fis3中cache.jsbug HOT 2
- 麻烦给个支持node版本说明 HOT 6
- optimizer.png-compressor: _handle.Pngcrush is not a constructor是什么意思 HOT 2
- fis3能不能集成rollup HOT 1
- fs3 [ v3.4.45 ] node [ v14.16.0 ] 执行 fis3 release -d ../dist 抛出异常 The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined HOT 2
- 启用了loader插件报message.content.replace is not a function
- fis3-deploy-http-push 的问题 HOT 1
- fis3依赖fis3-deploy-http-push2.0.6,fis3-deploy-http-push2.0.6依赖winston2.1.1,当我升级node版本到14,vue项目编译时报错(node:31521) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency HOT 3
- Update packages to avoid introducing vulnerablities HOT 2
- Trying to get in touch regarding a security issue
- 似乎在mac12.1系统版本里面热更新不生效了 HOT 3
- 在mock/server.conf下配置proxy时,如何替换/删除uri的前缀?
- 增加nodejs 14+支持 HOT 4
- react-router-dom的BrowserRouter,fis-conf该怎么配置才能解决再次刷新页面会显示404这个问题 HOT 1
- 不兼容高版本 node HOT 4
- fis3支持node版本问题 HOT 1
- 在deploy中插件中改变modified中文件内容,total中的文件内容不改变,fis3-deploy-replace改变内容后 fis3-deploy-zip打包出去的内容未改变
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fis3.