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

Not work when the less file not list in rollup's input option. #28

Open
vipcxj opened this issue Aug 13, 2019 · 3 comments
Open

Not work when the less file not list in rollup's input option. #28

vipcxj opened this issue Aug 13, 2019 · 3 comments

Comments

@vipcxj
Copy link

vipcxj commented Aug 13, 2019

this is my rollup.config.js

export default {
    input: 'src/index.ts',
    output: [
        { file: 'dist/index.js', format: 'cjs' },
    ],
    plugins: [
        ...
        less({
            output: 'dist/index.css',
            include: 'src/index.less',
        })
    ]
}

no index.css is generated.

@raybooysen
Copy link

What does your index.ts look like?

@vipcxj
Copy link
Author

vipcxj commented Aug 21, 2019

@raybooysen Adding import './xxx.ess' to the index.ts, and then work. But I don't know whether it has a side effect. Because I am writing a library, and I want the library user import the css or less themselvies. So the style file should not be imported by my library automatically.

@raybooysen
Copy link

I don't think it has an impact. If you look at your transpiled code, there is no reference to the less.

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