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

打包后icon的classname合在一起了,没有空开 #100

Closed
rudyxu1102 opened this issue Jul 5, 2019 · 0 comments
Closed

打包后icon的classname合在一起了,没有空开 #100

rudyxu1102 opened this issue Jul 5, 2019 · 0 comments

Comments

@rudyxu1102
Copy link
Contributor

rudyxu1102 commented Jul 5, 2019

fis配置

const build = fis.media('build');

build.match('/node_modules/(**)', {
    release: '/n/$1'
});

build.match('/script/refresh.js', {
    optimizer: fis.plugin('uglify-js'),
    release: '/script/refresh.js'
});

build.match('::package', {
    packager: fis.plugin('deps-pack', packConfig),
    postpackager: [fis.plugin('loader', {
        useInlineMap: false,
        resourceType: 'mod'
    }), function(ret) {
        const indexHtml = ret.src['/index.html'];
        const pages = [];
        const contents = indexHtml.getContent();
        pages.forEach(function(path) {
            const file = fis.file(fis.project.getProjectPath(), '/' + path + '.html');
            file.setContent(contents);
            ret.pkg[file.getId()] = file;
        });
    }]
});

build.match('*.{css,less,scss}', {
    optimizer: fis.plugin('clean-css'),
    useHash: true
});

build.match('::image', {
    useHash: true
});

build.match('*.{js,ts,tsx}', {
    optimizer: fis.plugin('uglify-js'),
    useHash: true
});
build.match('/script/refresh.js', {
    useHash: false
});
build.match('*.map', {
    release: false,
    url: 'null',
    useHash: false
});
build.match('{*.jsx,*.tsx,*.ts}', {
    parser: fis.plugin('typescript', {
        sourceMap: false,
        importHelpers: true
    })
});
build.match('{*.jsx,*.tsx,*.ts,*.js}', {
    moduleId: function (m, path) {
        return fis.util.md5('amis' + path);
    }
})

build.match('*', {
    deploy: [
        fis.plugin('skip-packed'),
        fis.plugin('local-deliver', {
            to: './dist'
        })
    ]
});
build.match('{*.min.js,monaco-editor/**.js}', {
    optimizer: null
});
build.match('monaco-editor/**.js', {
    useHash: false
});

image

麻烦有空看下,谢谢

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