From a3a94f127f26cb22f181242324fc342fdecb0b45 Mon Sep 17 00:00:00 2001 From: Simon Kobyda Date: Wed, 8 Jan 2020 17:40:59 +0100 Subject: [PATCH] Add css-loader and file-loader --- package.json | 35 +++++++++++++++++++++++++++-------- src/index.html | 2 +- src/index.js | 2 +- webpack.config.js | 17 ++++++++++++++--- 4 files changed, 43 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 38d14b1..f4b75e8 100644 --- a/package.json +++ b/package.json @@ -13,40 +13,59 @@ "eslint:fix": "eslint --fix --ext .js --ext .jsx src/" }, "devDependencies": { - "@babel/core": "^7.5.4", - "@babel/preset-env": "^7.5.4", + "@babel/core": "^7.6.0", + "@babel/preset-env": "^7.6.0", "@babel/preset-react": "^7.0.0", "babel-eslint": "^10.0.3", "babel-loader": "^8.0.0", "chrome-remote-interface": "^0.28.0", "compression-webpack-plugin": "^1.1.11", "copy-webpack-plugin": "^4.5.2", - "css-loader": "^3.0.0", - "eslint": "^6.3.0", + "css-loader": "^3.2.0", + "eslint": "^6.5.1", "eslint-config-standard": "^14.1.0", "eslint-config-standard-react": "^9.2.0", - "eslint-loader": "^3.0.0", + "eslint-loader": "^3.0.2", "eslint-plugin-flowtype": "^4.3.0", "eslint-plugin-import": "^2.18.2", "eslint-plugin-node": "^10.0.0", "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-react": "^7.14.3", - "eslint-plugin-react-hooks": "^2.1.2", + "eslint-plugin-react": "^7.16.0", "eslint-plugin-standard": "^4.0.1", "mini-css-extract-plugin": "^0.9.0", "htmlparser": "^1.7.7", "jed": "^1.1.1", + "less": "^3.8.0", + "less-loader": "^5.0.0", + "optimize-css-assets-webpack-plugin": "^5.0.3", + "svgo": "1.3.0", "po2json": "^1.0.0-alpha", "sass-loader": "^7.0.3", "sizzle": "^2.3.3", "stdio": "^0.2.7", + "terser-webpack-plugin": "^2.0.1", "webpack": "^4.17.1", "webpack-cli": "^3.1.0" }, "dependencies": { + "@patternfly/patternfly": "^2.40.13", + "@patternfly/react-core": "^3.120.8", + "bootstrap": "4.4.1", + "bootstrap-less": "3.3.8", "core-js": "3.6.4", + "docker-names": "1.1.1", + "moment": "2.24.0", "node-sass": "4.13.1", + "patternfly": "3.59.4", + "patternfly-react": "2.39.13", + "prop-types": "15.7.2", "react": "16.12.0", - "react-dom": "16.12.0" + "react-addons-css-transition-group": "15.6.2", + "react-addons-transition-group": "15.6.2", + "react-dom": "16.12.0", + "react-scrollable-anchor": "0.6.1", + "strict-loader": "1.2.0", + "throttle-debounce": "2.1.0", + "xterm": "3.14.5" } } diff --git a/src/index.html b/src/index.html index 55b4c60..18a81d6 100644 --- a/src/index.html +++ b/src/index.html @@ -30,7 +30,7 @@ along with this package; If not, see . - +
diff --git a/src/index.js b/src/index.js index 0a0e535..b6a01a6 100644 --- a/src/index.js +++ b/src/index.js @@ -17,7 +17,7 @@ * along with Cockpit; If not, see . */ -import "core-js/stable"; +// import "core-js/stable"; import React from 'react'; import ReactDOM from 'react-dom'; diff --git a/webpack.config.js b/webpack.config.js index 01973c4..5e1b562 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -133,8 +133,7 @@ module.exports = { test: /\.(js|jsx)$/ }, { - exclude: /node_modules/, - test: /\.scss$/, + test: /\.(scss|css)$/, use: [ extract.loader, { @@ -145,7 +144,19 @@ module.exports = { loader: 'sass-loader', } ] - } + }, + { + test: /\.less$/, + use: [ + extract.loader, + { + loader: 'css-loader' + }, + { + loader: "less-loader" + } + ] + }, ] }, plugins: plugins