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

1.0.12版本对stc-inline的影响 #1

Open
xuexb opened this issue Apr 23, 2017 · 0 comments
Open

1.0.12版本对stc-inline的影响 #1

xuexb opened this issue Apr 23, 2017 · 0 comments

Comments

@xuexb
Copy link

xuexb commented Apr 23, 2017

发现升级后在使用 stc-inline 时配置文件不变, 编译后代码有问题, 配置如:

stc.workflow({
    uglify: {plugin: uglify, exclude: [/static\/admin\/src/]},
    cssCombine: {plugin: cssCombine, include: /\.css$/},
    cssCompress: {
        plugin: cssCompress
    },
    localstorage: {
        include: {
            type: 'tpl'
        },
        plugin: localstorage,
        options: {
            adapter: localstorageAdapter,
            minLength: 200,
            appId: '3e988cdb'
        }
    },
    htmlCompress: {
        plugin: htmlCompress,
        options: {
            trim: true
        }
    },
    resourceVersion: {
        plugin: resourceVersion
    },
    inline: {
        plugin: inline,
        include: /\.html$/,
        options: {
            uglify: true,
            datauri: true,
            jsinline: true,
            allowRemote: true
        }
    },
})
<link rel=stylesheet href="/static/mip/css/all.css?v=6e813" inline>

必须把配置里的 inline 移动 resourceVersion 前面才行, 不知道是不是 bug...

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

1 participant