diff --git a/README.rst b/README.rst index 62e90adf4..541099e85 100755 --- a/README.rst +++ b/README.rst @@ -49,13 +49,6 @@ This MFE is configured via node environment variables supplied at build time. Se For more information see the document: `Micro-frontend applications in Open edX `__. ----------- - -Notes ------ - -The production Webpack configuration for this repo uses `Purgecss `__ to remove unused CSS from the production css file. In ``webpack.prod.config.js`` the Purgecss plugin is configured to scan directories to determine what css selectors should remain. Currently the src/ directory is scanned along with all ``@edx/frontend-component*`` node modules and ``@edx/paragon``. **If you add and use a component in this repo that relies on HTML classes or ids for styling you must add it to the Purgecss configuration or it will be unstyled in the production build.** - .. |Build Status| image:: https://api.travis-ci.org/edx/frontend-app-profile.svg?branch=master :target: https://travis-ci.org/edx/frontend-app-profile .. |Codecov| image:: https://img.shields.io/codecov/c/github/edx/frontend-app-profile diff --git a/package-lock.json b/package-lock.json index 520438b71..b7a15fb1c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15896,49 +15896,6 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, - "purgecss": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/purgecss/-/purgecss-4.0.3.tgz", - "integrity": "sha512-PYOIn5ibRIP34PBU9zohUcCI09c7drPJJtTDAc0Q6QlRz2/CHQ8ywGLdE7ZhxU2VTqB7p5wkvj5Qcm05Rz3Jmw==", - "dev": true, - "requires": { - "commander": "^6.0.0", - "glob": "^7.0.0", - "postcss": "^8.2.1", - "postcss-selector-parser": "^6.0.2" - }, - "dependencies": { - "commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", - "dev": true - } - } - }, - "purgecss-webpack-plugin": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/purgecss-webpack-plugin/-/purgecss-webpack-plugin-4.0.3.tgz", - "integrity": "sha512-YqmHRuKqjPhB+f/kURHYwlUR2QDcS8NSpCWrgQNICsSd8S2+tj40SDBav5b8KaSPQ8b/uXqrJxa/SnLyHK4BvQ==", - "dev": true, - "requires": { - "purgecss": "^4.0.3", - "webpack": "^5.4.0", - "webpack-sources": "^2.0.0" - }, - "dependencies": { - "webpack-sources": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.3.0.tgz", - "integrity": "sha512-WyOdtwSvOML1kbgtXbTDnEW0jkJ7hZr/bDByIwszhWd/4XX1A3XMkrbFMsuH4+/MfLlZCUzlAdg4r7jaGKEIgQ==", - "dev": true, - "requires": { - "source-list-map": "^2.0.1", - "source-map": "^0.6.1" - } - } - } - }, "q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", diff --git a/package.json b/package.json index e9e1bbf9d..d1ed8e552 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,6 @@ "es-check": "5.2.4", "glob": "7.1.7", "husky": "6.0.0", - "purgecss-webpack-plugin": "4.0.3", "react-test-renderer": "16.14.0", "reactifex": "1.1.1", "redux-mock-store": "1.5.4" diff --git a/webpack.prod.config.js b/webpack.prod.config.js deleted file mode 100644 index 5eefbfa92..000000000 --- a/webpack.prod.config.js +++ /dev/null @@ -1,21 +0,0 @@ -const glob = require('glob'); -const PurgecssPlugin = require('purgecss-webpack-plugin'); -const { createConfig } = require('@edx/frontend-build'); - -module.exports = createConfig('webpack-prod', { - plugins: [ - // Scan files for class names and ids and remove unused css - new PurgecssPlugin({ - paths: [].concat( - // Scan files in this app - glob.sync('src/**/*', { nodir: true }), - // Scan files in any edx frontend-component - glob.sync('node_modules/@edx/frontend-component*/**/*', { nodir: true }), - // Scan files in paragon - glob.sync('node_modules/@edx/paragon/**/*', { nodir: true }), - ), - // Protect react-css-transition class names - safelist: [/-enter/, /-appear/, /-exit/], - }), - ], -});