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

Fix browser bundling with webpack 5 #1553

Merged
merged 5 commits into from Apr 11, 2021
Merged

Fix browser bundling with webpack 5 #1553

merged 5 commits into from Apr 11, 2021

Commits on Apr 8, 2021

  1. Fix browser bundling with webpack 5

    I think that the browser field is missing `url: false`.
    I'm not completely sure that this is the right fix and also the npm package `url` does not implement the APIs used by postcss. 
    
    steps to reproduce
    
    ```
    mkdir postcss-browser 
    cd postcss-browser 
    mkdir src
    echo 'import "postcss";' > src/index.js
    npm init -y
    npm install webpack webpack-cli postcss
    npx webpack
    ```
    This will emit error: 
    ```
    ERROR in ./node_modules/postcss/lib/input.js 3:39-53
    Module not found: Error: Can't resolve 'url' in 'C:\projects\postcss-web-bundle\postcss-browser\node_modules\postcss\lib'
    ```
    barak007 committed Apr 8, 2021
    Copy the full SHA
    a54d020 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2021

  1. disable url based features

    barak007 committed Apr 10, 2021
    Copy the full SHA
    8f02bdc View commit details
    Browse the repository at this point in the history
  2. add error for sourcePath

    barak007 committed Apr 10, 2021
    Copy the full SHA
    ff2fd57 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2021

  1. Apply suggestions from code review

    Co-authored-by: Andrey Sitnik <andrey@sitnik.ru>
    barak007 and ai committed Apr 11, 2021
    Copy the full SHA
    8c58434 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    7c2e97a View commit details
    Browse the repository at this point in the history