Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译时把html文件的后缀改为ejs时,resouremap没有注入 #58

Open
tiodot opened this issue Jun 10, 2016 · 1 comment
Open

Comments

@tiodot
Copy link

tiodot commented Jun 10, 2016

配置:

fis.match('::packager', {
    // npm install [-g] fis3-postpackager-loader
    // 分析 __RESOURCE_MAP__ 结构,来解决资源加载问题
    postpackager: fis.plugin('loader', {
        resourceType: 'mod',
        useInlineMap: true // 资源映射表内嵌
    }),
    packager: fis.plugin('map'),
    spriter: fis.plugin('csssprites', {
        layout: 'matrix',
        margin: '15'
    })

}).match('**/*.css', {
    packTo: 'public/stylesheets/all.css' //css打成一个包
});

如果不更改后缀名称,

fis.match("index.html", {
    release: 'views/index',
    //rExt: '.ejs',
    useCache : false
});

编译之后,resourceMap注入正常。

但是如果把变更后缀这个去掉

fis.match("index.html", {
    release: 'views/index',
    rExt: '.ejs',
    useCache : false
});

编译正常,但是resourceMap没有注入进去。

@2betop
Copy link
Contributor

2betop commented Jun 12, 2016

需要标明是 htmlLike

fis.match("index.html", {
    release: 'views/index',
    rExt: '.ejs',
    useCache : false,
    isHtmlLike: true
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants