File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
integrations/tailwindcss-cli/tests Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -391,6 +391,37 @@ describe('Build command', () => {
391391 expect ( contents ) . toContain ( `/*# sourceMappingURL` )
392392 } )
393393
394+ test ( '--postcss supports ESM configs' , async ( ) => {
395+ await writeInputFile ( 'index.html' , html `<div class= "font-bold" > </ div> ` )
396+
397+ let customConfig = javascript `
398+ export default {
399+ map: { inline: true },
400+ plugins: [
401+ function tailwindcss () {
402+ return require(path.resolve ('..' , '..' ))
403+ },
404+ ],
405+ }
406+ `
407+
408+ await writeInputFile ( '../postcss.config.mjs' , customConfig )
409+
410+ await $ ( `${ EXECUTABLE } --output ./dist/main.css --postcss postcss.config.mjs` )
411+
412+ let contents = await readOutputFile ( 'main.css' )
413+
414+ expect ( contents ) . toIncludeCss (
415+ css `
416+ .font-bold {
417+ font- weight: 700;
418+ }
419+ `
420+ )
421+
422+ expect ( contents ) . toContain ( `/*# sourceMappingURL` )
423+ } )
424+
394425 test ( 'postcss-import is supported by default' , async ( ) => {
395426 cleanupFile ( 'src/test.css' )
396427
You can’t perform that action at this time.
0 commit comments