other plugin invoke twice
See original GitHub issueconst postcss = require( 'postcss' )
const modules = require( 'postcss-modules' )
let testPlugin = postcss.plugin( 'test-plugin-1', () => {
return () => {
console.log( 'test-plugin-1 running' )
}
} )
let testPlugin2 = postcss.plugin( 'test-plugin-2', () => {
return () => {
console.log( 'test-plugin-2 running' )
}
} )
postcss( [
modules( {
getJSON( _, json ) {
}
} ),
testPlugin(),
testPlugin2()
] )
.process( `
.title {
color: green;
}` )
.then( () => {
} )
if you run this code, that two plugins were running twice. Did i use this plugin in a wrong way?
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
other plugin invoke twice · Issue #70 - GitHub
if you run this code, that two plugins were running twice. Did i use this plugin in a wrong way? The text was...
Read more >Maven: run plugin twice during a phase, interleaved with ...
In this case we would need a kind of merge attribute on the execution element or have a different behavior by default (that...
Read more >Plugin executed twice? - Microsoft Dynamics CRM Forum ...
The plugin should not be executing twice. Do you have any other plugins that are showing this behavior? Was the plugin registered in...
Read more >WordPress plugin executing code twice
I did a test to confirm it, so here is the output of the time: <date=12:36:34 am> <date=12:36:41am> . When I open my...
Read more >How to run a plugin twice in one project? - Gradle Forums
I would like to run it twice with different direcotries. When you have one type of less css it is simple, just implement...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@peter-mouland I recommend you move away from this module as it is not properly maintained. I have opened several pull requests and issues (to upgrade the postcss dependency) in October, but they are still open.
Both our our webpack css loader and the defaul css loader have adopted another strategy of supporting css modules.
Incidentally, this other approach does not involve the composition plugin.
No you did not. I don’t know why, but this plugin executes
postcss
with all other plugins: https://github.com/css-modules/postcss-modules/blob/master/src/index.js#L75The simple fix is:
Please be aware of: https://github.com/btd/postcss-plugin-composition/issues/1
A copy without this problem: