Skip to content

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

@fangjj

Description

@fangjj

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions