diff --git a/package.json b/package.json index acc5fef..70edf41 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "react": "^17.0.2", "react-dom": "^17.0.2", "react-scripts": "4.0.3", + "style-loader": "^3.2.1", "typescript": "^4.1.2", "webpack": "^5.51.1", "webpack-cli": "^4.8.0" diff --git a/webpack.config.js b/webpack.config.js index 80d952a..a1bb841 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -3,7 +3,7 @@ const path = require("path") module.exports = { // Mode: setting this to development preconfigure webpack with some defaults - mode: "production", + mode: "development", // Loaders: these allow various non-js filetypes to be imported module: { @@ -11,19 +11,26 @@ module.exports = { { test: /[.]css$/, exclude: /node_modules/, - use: [{ - loader: "css-loader", - }], + use: [ + { + loader: "style-loader" + }, + { + loader: "css-loader" + }, + ], }, { test: /[.]js$/, exclude: /node_modules/, - use: [{ - loader: "babel-loader", - options: { - presets: ["@babel/preset-env"] - }, - }], + use: [ + { + loader: "babel-loader", + options: { + presets: ["@babel/preset-env"] + }, + } + ], }, { test: /[.]jsx$/, diff --git a/yarn.lock b/yarn.lock index 67f4d34..ea3b987 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13499,6 +13499,11 @@ style-loader@1.3.0, style-loader@^1.3.0: loader-utils "^2.0.0" schema-utils "^2.7.0" +style-loader@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-3.2.1.tgz#63cb920ec145c8669e9a50e92961452a1ef5dcde" + integrity sha512-1k9ZosJCRFaRbY6hH49JFlRB0fVSbmnyq1iTPjNxUmGVjBNEmwrrHPenhlp+Lgo51BojHSf6pl2FcqYaN3PfVg== + style-to-object@0.3.0, style-to-object@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/style-to-object/-/style-to-object-0.3.0.tgz#b1b790d205991cc783801967214979ee19a76e46"