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

import less from a JavaScript file in imports folder not being processed by postcss #37

Open
fangjj opened this issue Aug 29, 2018 · 0 comments

Comments

@fangjj
Copy link

fangjj commented Aug 29, 2018

import less from a JavaScript file in imports folder, that less is not bundled with the rest of the CSS processed with the Meteor Build tool, but instead is put in your app’s tag inside <style>...</style> after the main concatenated CSS file. like this.

/imports/components/
            /componentA/
                    componentA.jsx
                    componentA.less
componentA.jsx
import React from 'react';
import './componentA.less';
export const ComponentA = (props) => {

	return (
		<div className="component-a">
			<h3>whoopee!</h3>
		</div>
	);
}

componentA.less is not being processed by postcss.

import componentA.less in /client/main.less
@import '{}/imports/ui/componentA.less';

it work processed by postcss! but componentA.less being processed and merge by meteor in one big css file, can't be dynamic import optimize.
so how import less from a JavaScript file in imports folder being processed by postcss

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