Closed GHNewbiee closed 4 years ago
Seems like I forgot to log error here - https://github.com/sarsamurmu/reboost/blob/primary/packages/core/src/node/plugins/postcss.ts#L106. It will be fixed in the next release.
Just FYI, in the case of path: path.join(process.cwd(), {}, '.config_files/postCSS'), // this error is caught
the execution was terminated. But, in the case of require('tailwindcss')(path.join(__dirname, {}, 'tailwindCSS/tailwindcss.config.js')) // this error is not caught
the execution was not (even) terminated at all!
Fixed in v0.13.0
Unfortunately, the problem still exists.
Even wrong path: path.join(process.cwd(), '.cccccconfig_files/ppppostCSS')
is not enough to stop the execution!
The expected error PostCSSPlugin: The given path for options.path does not exist - ${options.path}
is not displayed.
Does it run right in your system?
As far as I remember it worked correctly for me. Let me check again tomorrow.
Just FYI,
reboost.js in project_root
dir
const path = require('path');
const {
start,
builtInPlugins: {
PostCSSPlugin
}
} = require('reboost');
start({
entries: [
['./src/index.js', './public/dist/index.js']
],
contentServer: {
root: './public',
open: true
},
plugins: [
PostCSSPlugin({
path: path.join(process.cwd(), '.cccccconfig_files/ppppostCSS')
})
]
});
Did you check it when PostCSS transforms a file? The error should be shown when PostCSSPlugin
tries to transform a file.
Will reopen again if it still not works.
Did you check it when PostCSS transforms a file?
First, I was expecting a kind of "global" initialization with checks through "warming up" since it's a built-in plugin. Next, I thought that
const {
start,
builtInPlugins: {
CSSPlugin,
PostCSSPlugin,
UsePlugin
}
} = require('reboost');
start({
plugins: [
UsePlugin(
{
include: /.+\.css$/i,
use: PostCSSPlugin(),
}
),
PostCSSPlugin({
path: path.join(process.cwd(), '.config_files/postCSS'),
ctx: { ... }
}),
CSSPlugin()
]
})
would be enough so that css
transformations automatically take place every time I make a change into a source css
file. Unless, I have to use CLI.
Please, when it is convenient for you, add some extra notes to the page with a very small example, how this plugin can be practically put in work. Just a simple and small css
file or CSS-in-JS
which is transformed. A limited template would be another possibility, too. Tia
Thanks for confirming and I will add some small example.
Error
path.join(__dirname, {}, 'tailwindCSS/tailwindcss.config.js')
is not caught. It seems thatpostcss.config.js
does not get parsed at all.Workspace
package.json
reboost.js
postcss.config.js