From 69daec708a062736af1d6aaf07c1d39aff026996 Mon Sep 17 00:00:00 2001 From: ChaotiCryptidz Date: Tue, 11 Jan 2022 13:16:08 +0000 Subject: [PATCH] fix babel and hopefully CI too --- package.json | 18 +++++++++--------- webpack-dev.config.js | 2 -- webpack.config.js | 17 ++++++++++------- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 2d134a2..318998b 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "eslint-plugin-sort-imports-es6-autofix": "^0.6.0", "git-revision-webpack-plugin": "^5.0.0", "html-webpack-plugin": "^5.5.0", - "mini-css-extract-plugin": "^2.4.6", "node-sass": "^7.0.1", "prettier": "^2.5.1", "raw-loader": "^4.0.2", @@ -34,17 +33,18 @@ "webpack-dev-server": "^4.7.2" }, "dependencies": { - "preact-router": "^4.0.0", - "uikit": "^3.9.4", - "preact": "^10.6.4", - "prismjs": "^1.26.0", - "qr-scanner": "^1.3.0", - "normalize.css": "^8.0.1", - "file-saver": "^2.0.5", + "@babel/plugin-syntax-import-assertions": "^7.16.7", "clipboard": "^2.0.8", "codejar": "^3.5.0", "core-js": "^3.20.2", "date-fns": "^2.28.0", - "i18next": "^21.6.5" + "file-saver": "^2.0.5", + "i18next": "^21.6.5", + "normalize.css": "^8.0.1", + "preact": "^10.6.4", + "preact-router": "^4.0.0", + "prismjs": "^1.26.0", + "qr-scanner": "^1.3.0", + "uikit": "^3.9.4" } } diff --git a/webpack-dev.config.js b/webpack-dev.config.js index 93a14de..9d390a1 100644 --- a/webpack-dev.config.js +++ b/webpack-dev.config.js @@ -2,7 +2,6 @@ const path = require('path'); const webpack = require('webpack'); var os = require("os"); -const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const { GitRevisionPlugin } = require('git-revision-webpack-plugin'); const gitRevisionPlugin = new GitRevisionPlugin(); @@ -22,7 +21,6 @@ module.exports = { timings: true, }, plugins: [ - new MiniCssExtractPlugin(), new HtmlWebpackPlugin({ title: "VaultUI" }), new webpack.DefinePlugin({ BUILD_STRING: diff --git a/webpack.config.js b/webpack.config.js index 7d24b8c..b3c4bd4 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -4,7 +4,6 @@ var os = require("os"); const TerserPlugin = require("terser-webpack-plugin"); const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); -const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const { GitRevisionPlugin } = require('git-revision-webpack-plugin'); const gitRevisionPlugin = new GitRevisionPlugin(); @@ -19,8 +18,7 @@ var babelOptions = { "targets": { "firefox": "78", "chrome": "84", - "safari": "11.1" - + "safari": "11.1" } } ] @@ -28,7 +26,8 @@ var babelOptions = { "plugins": [ ["@babel/plugin-proposal-decorators", { "decoratorsBeforeExport": true }], ["@babel/plugin-proposal-class-properties"], - ["@babel/transform-runtime"] + ["@babel/transform-runtime"], + ["@babel/plugin-syntax-import-assertions"] ] }; @@ -48,7 +47,6 @@ module.exports = { timings: true, }, plugins: [ - new MiniCssExtractPlugin(), new HtmlWebpackPlugin({ title: "VaultUI" }), new webpack.DefinePlugin({ BUILD_STRING: @@ -66,11 +64,16 @@ module.exports = { module: { rules: [ + { + assert: { type: "css" }, + loader: "css-loader", + options: { + exportType: "string", + }, + }, { test: /\.(sa|sc|c)ss$/, use: [ - MiniCssExtractPlugin.loader, - {loader: "css-loader", options: {exportType: "string"}}, "sass-loader" ], },