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

分析依赖后生成了多余的css文件 #9

Closed
KohPoll opened this issue Nov 27, 2013 · 2 comments
Closed

分析依赖后生成了多余的css文件 #9

KohPoll opened this issue Nov 27, 2013 · 2 comments

Comments

@KohPoll
Copy link

KohPoll commented Nov 27, 2013

我配置的版本:~0.1.11(应该是最新的?)

我的目录结构:

- sample
   - components
        - a
            - index.js
            - index.css
    - build

我把components下的组件分析依赖后生成到build目录。

我的grunt配置:

// componentDir = 'components',  buildDir = 'build', 
kmc: {
    components: {
        options: {
            packages: [
                {
                    name: componentDir,
                    path: buildDir + '/',
                    charset: 'utf-8'
                }
            ],
            comboOnly: true,
            comboMap: true,
            depFilePath: buildDir + '/.init.js',
            fixModuleName: true
        },
        files: [
            {
                src: buildDir + '/' + componentDir + '/**/*.js',
                dest: buildDir + '/'
            }
        ]
    }
}

依赖分析,模块名补全都没问题,但是会多生成一个index.css.css的文件。初步怀疑是因为components/a/index.js里面写了{requires: ['./index.css']}。

完整的目录可以在这里查看:https://github.com/KohPoll/sample

@daxingplay
Copy link
Owner

This is a bug in kmc: daxingplay/kmc#36

@daxingplay
Copy link
Owner

修复了,请更新grunt-kmc到v0.1.13版本

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