import less from a JavaScript file in imports folder not being processed by postcss
fangjj opened this issue · comments
redim commented
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