Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include the .pcss extension for PostCSS files #718

Merged
merged 1 commit into from
Apr 17, 2020

Conversation

opdavies
Copy link
Contributor

@opdavies opdavies commented Apr 1, 2020

This PR adds support for the .pcss file extension for PostCSS files.

I've got this to work by overriding the CSS Loader test within my webpack.config.js using the .configureLoaderRule() as documented in https://www.oliverdavies.uk/articles/using-the-pcss-extension-with-webpack-encore.

But it would be nice to have this supported by default to make things simpler and not having to see the Be careful when using Encore.configureLoaderRule() message on each build.

@opdavies
Copy link
Contributor Author

opdavies commented Apr 1, 2020

@weaverryan Any advice on this? The tests are passing here, but failing locally if I run npm run test and don't update the versioned filenames.

1) Functional tests using webpack
   Basic scenarios.
     copyFiles() allows to copy files and folders
       Copy with versioning enabled:

  Uncaught AssertionError: expected '/Users/opdavies/Code/tmp/webpack-encore/test_tmp/oil16n/www/build' to have the same files as [ Array(6) ]
  + expected - actual

   [
     "entrypoints.json"
  -  "main.88a14d18.js"
  +  "main.ceeddab6.js"
     "manifest.json"
  -  "runtime.0c796a0d.js"
  +  "runtime.d2591ff7.js"
     "symfony_logo.ea1ca6f7.png"
     "symfony_logo_alt.f27119c2.png"
   ]

@Lyrkan
Copy link
Collaborator

Lyrkan commented Apr 1, 2020

The tests are passing here, but failing locally if I run npm run test and don't update the versioned filenames.

Did you retrieve the dependencies using npm instead of Yarn?
The project only has a yarn.lock file, so if you don't install them through Yarn you won't get the right versions.

@opdavies
Copy link
Contributor Author

opdavies commented Apr 1, 2020

Possibly. :)

I'll delete node_modules, re-download using Yarn and re-try.

@opdavies
Copy link
Contributor Author

opdavies commented Apr 1, 2020

I've re-installed with Yarn and run yarn run test instead, and everything passes.

Thanks @Lyrkan!

@opdavies opdavies marked this pull request as ready for review April 1, 2020 12:07
@weaverryan
Copy link
Member

Thank you @opdavies!

@weaverryan weaverryan merged commit e81454e into symfony:master Apr 17, 2020
@opdavies opdavies deleted the add-pcss-extension branch April 17, 2020 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants