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

Sourcemap are "empty" when using Webpack plugin #409

Closed
jimblue opened this issue May 9, 2020 · 6 comments
Closed

Sourcemap are "empty" when using Webpack plugin #409

jimblue opened this issue May 9, 2020 · 6 comments
Milestone

Comments

@jimblue
Copy link

jimblue commented May 9, 2020

Hello,

I have the following Purge CSS Plugin configuration in Webpack 4 :

new PurgeCssPlugin({ paths: glob.sync(Settings.filesToPurge, { nodir: true }) })

And my source map look like this :

{"version":3,"sources":[],"names":[],"mappings":"","file":"css/main.d010269e7b0748fe040a.css","sourceRoot":""}

When I replace Purge CSS Plugin by the same configuration but inside Post CSS Loader my source map seems ok and look like this :

{"version":3,"sources":["webpack:///main.scss","webpack:///utilities/_variables.scss","webpack:///../../node_modules/bulma/sass/utilities/mixins.sass","webpack:///../../node_modules/bulma/sass/utilities/animations.sass","webpack:///../../node_modules/bulma/sass/utilities/controls.sass","webpack:///base/_animations.scss","webpack:///../fonts/librebaskerville/_stylesheet.scss","webpack:///../fonts/metropolis/_stylesheet.scss","webpack:///../../node_modules/bulma/sass/elements/button.sass","webpack:///../../node_modules/bulma/sass/elements/container.sass",],"names":[],"mappings":"AAAA,gBAAgB,s95ECAhB,SC2IA,SFnIA,S,SE0JE,S,SFrJF,S,SE4OA,SFxJA,S,SEkKA,SF1IA,S,SGzHA,SHkIA,S,SGlIA,SHkIA,SI3FA,SJ8GA,SIvHE,SJ0HF,SIrHE,SJwHF,S,SKvJA,SL+KA,SKlJA,SLwJA,S,SMtLA,SN8LA,SMtLA,SN6LA,SMrLA,SN4LA,SO5MA,SPmNA,SO3MA,SPkNA,SO1MA,SPiNA,SOzMA,SPgNA,SOxMA,SP+MA,SQpMA,SRmNA,SQ/LI,SRsMJ,SQhMI,SRoMJ,SQjMI,SRqMJ,SQlMI,SRsMJ,SQlME,SRsMF,SQlME,SRsMF,SQlMI,SRqMJ,SQnME,SRuMF,SQlME,SRwMF,SQnMI,SRuMJ,SQjMI,SRqMJ,SQjMI,SRsMJ,SQ9LI,SRmMJ,SQ/LM,SRoMN,SQ/LM,SRmMN,SQ/LQ,SRkMR,SQhMM,SRqMN,SQhMM,SRqMN,SQnLQ,SRmMR,SQjMM,SRsMN,SQlMQ,SRuMR,SQ/LU,SRkMV,SQ5LY,SR+LZ,SQ7LQ,SRmMR,SQ/PI,SRsRJ,SQlRM,SRuRN,SQlRM,SRsRN,SQlRQ,SRqRR,SQnRM,SRwRN,SQnRM,SRwRN,SQtQQ,SRsRR,SQpRM,SRyRN,SQrRQ,SR0RR,SQlRU,SRqRV,SQ/QY,SRkRZ,SQhRQ,SRsRR,SQlVI,SRyWJ,SQrWM,SR0WN,SQrWM,SRyWN,SQrWQ,SRwWR,SQtWM,SR2WN,SQtWM,SR2WN,SQzVQ,SRyWR,SQvWM,SR4WN,SQxWQ,SR6WR,SQrWU,SRwWV,SQlWY,SRqWZ,SQnWQ,SRyWR,SQraI,SR4bJ,SQxbM,SR6bN,SQxbM,SR4bN,SQxbQ,SR2bR,SQzbM,SR8bN,SQzbM,SR8bN,SQ5aQ,SR4bR,SQ1bM,SR+bN,SQ3bQ,SRgcR,SQxbU,SR2bV,SQrbY,SRwbZ,SQtbQ,SR4bR,SQxfI,SRkmBJ,SQ9lBM,SRmmBN,SQ9lBM,SRkmBN,SQ9lBQ,SRimBR,SQ/lBM,SRomBN

Seems something is broken with the plugin

@wilbertcaba
Copy link

wilbertcaba commented Aug 4, 2020

I'm running through the exact same issue @jsnanigans @Ffloriel

@wscfe
Copy link

wscfe commented Dec 10, 2020

how to solve this

@chaoticvibe
Copy link

I'm running through the exact same issue.
Withou purgecss my webpack settings emit well css source-map.

@rob-baker-ar
Copy link

I managed to work around this by removing the webpack plugin and using PurgeCSS via a PostCSS plugin instead. This means PostCSS is handling the source-map.

@jimblue
Copy link
Author

jimblue commented Sep 26, 2021

Hi there,
Just a friendly ping to know if a fix for this issue is planned in the roadmap ?
Cheers

@Ffloriel Ffloriel added this to the 5.0.0 milestone Feb 21, 2022
Ffloriel added a commit that referenced this issue Feb 23, 2022
BREAKING CHANGE: drop webpack 4 support
@jimblue
Copy link
Author

jimblue commented Sep 13, 2022

🙏🏼 thank you 🙏🏼

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

No branches or pull requests

6 participants