TagSpaces is an offline, open source, document manager with tagging support
fixing web and cordova builds
Ilian Sapundshievee0159da985e
diff --git a/package.json b/package.jsonindex cfeb2eed8..f2ecf3cbc 100644--- a/package.json+++ b/package.json@@ -8,8 +8,8 @@"lint-fix": "yarn lint -- --fix","lint-styles": "stylelint app/*.css app/components/*.css --syntax scss","lint-styles-fix": "stylefmt -r app/*.css app/components/*.css",- "build": "yarn version-meta && yarn build-main && yarn build-renderer && yarn build-worker",- "build-c": "yarn version-meta && concurrently \"yarn build-main\" \"yarn build-renderer\" \"yarn build-worker\"",+ "build-nc": "yarn version-meta && yarn build-main && yarn build-renderer && yarn build-worker",+ "build": "yarn version-meta && concurrently \"yarn build-main\" \"yarn build-renderer\" \"yarn build-worker\"","build-dll": "cross-env NODE_ENV=development node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.renderer.dev.dll.js --progress --profile --colors","build-cordova": "cross-env NODE_ENV=production node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.renderer.cordova.js --progress --profile --colors","build-web": "cross-env NODE_ENV=production node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.renderer.web.js --progress --profile --colors",diff --git a/webpack.config.renderer.cordova.js b/webpack.config.renderer.cordova.jsindex 7a8c4d80e..5a11ed8af 100644--- a/webpack.config.renderer.cordova.js+++ b/webpack.config.renderer.cordova.js@@ -4,7 +4,7 @@import path from 'path';import webpack from 'webpack';-import ExtractTextPlugin from 'extract-text-webpack-plugin';+import MiniCssExtractPlugin from 'mini-css-extract-plugin';import merge from 'webpack-merge';import baseConfig from './webpack.config.base';@@ -37,69 +37,83 @@ export default merge.smart(baseConfig, {// Extract all .global.css to style.css as is{test: /\.global\.css$/,- use: ExtractTextPlugin.extract({- use: 'css-loader',- fallback: 'style-loader',- })+ use: [+ {+ loader: MiniCssExtractPlugin.loader,+ options: {+ publicPath: './'+ }+ },+ {+ loader: 'css-loader',+ options: {+ sourceMap: true+ }+ }+ ]},// Pipe other styles through css modules and append to style.css{test: /^((?!\.global).)*\.css$/,- use: ExtractTextPlugin.extract({- use: {+ use: [+ {+ loader: MiniCssExtractPlugin.loader+ },+ {loader: 'css-loader',options: {modules: true,- importLoaders: 1,localIdentName: '[name]__[local]__[hash:base64:5]',+ sourceMap: true}}- }),+ ]},// Add SASS support - compile all .global.scss files and pipe it to style.css{- test: /\.global\.scss$/,- use: ExtractTextPlugin.extract({- use: [- {- loader: 'css-loader'- },- {- loader: 'sass-loader'+ test: /\.global\.(scss|sass)$/,+ use: [+ {+ loader: MiniCssExtractPlugin.loader+ },+ {+ loader: 'css-loader',+ options: {+ sourceMap: true,+ importLoaders: 1+ }+ },+ {+ loader: 'sass-loader',+ options: {+ sourceMap: true}- ],- fallback: 'style-loader',- })+ }+ ]},// Add SASS support - compile all other .scss files and pipe it to style.css{- test: /^((?!\.global).)*\.scss$/,- use: ExtractTextPlugin.extract({- use: [{+ test: /^((?!\.global).)*\.(scss|sass)$/,+ use: [+ {+ loader: MiniCssExtractPlugin.loader+ },+ {loader: 'css-loader',options: {modules: true,importLoaders: 1,localIdentName: '[name]__[local]__[hash:base64:5]',+ sourceMap: true}},{- loader: 'sass-loader'- }]- }),- },- // Add LESS support - compile all other .less files and pipe it to style.css- {- test: /\.less$/,- use: ExtractTextPlugin.extract({- use: [{- loader: 'css-loader'- }, {- loader: 'less-loader'- }],- // use style-loader in development- fallback: 'style-loader'- })+ loader: 'sass-loader',+ options: {+ sourceMap: true+ }+ }+ ]},// Fonts{@@ -140,7 +154,9 @@ export default merge.smart(baseConfig, {new webpack.IgnorePlugin(/electron-io/),- new ExtractTextPlugin('style.css'),+ new MiniCssExtractPlugin({+ filename: 'style.css'+ }),],});diff --git a/webpack.config.renderer.web.js b/webpack.config.renderer.web.jsindex 1bf4881fe..992f20807 100644--- a/webpack.config.renderer.web.js+++ b/webpack.config.renderer.web.js@@ -4,7 +4,7 @@import path from 'path';import webpack from 'webpack';-import ExtractTextPlugin from 'extract-text-webpack-plugin';+import MiniCssExtractPlugin from 'mini-css-extract-plugin';import merge from 'webpack-merge';import baseConfig from './webpack.config.base';@@ -36,69 +36,83 @@ export default merge.smart(baseConfig, {// Extract all .global.css to style.css as is{test: /\.global\.css$/,- use: ExtractTextPlugin.extract({- use: 'css-loader',- fallback: 'style-loader',- })+ use: [+ {+ loader: MiniCssExtractPlugin.loader,+ options: {+ publicPath: './'+ }+ },+ {+ loader: 'css-loader',+ options: {+ sourceMap: true+ }+ }+ ]},// Pipe other styles through css modules and append to style.css{test: /^((?!\.global).)*\.css$/,- use: ExtractTextPlugin.extract({- use: {+ use: [+ {+ loader: MiniCssExtractPlugin.loader+ },+ {loader: 'css-loader',options: {modules: true,- importLoaders: 1,localIdentName: '[name]__[local]__[hash:base64:5]',+ sourceMap: true}}- }),+ ]},// Add SASS support - compile all .global.scss files and pipe it to style.css{- test: /\.global\.scss$/,- use: ExtractTextPlugin.extract({- use: [- {- loader: 'css-loader'- },- {- loader: 'sass-loader'+ test: /\.global\.(scss|sass)$/,+ use: [+ {+ loader: MiniCssExtractPlugin.loader+ },+ {+ loader: 'css-loader',+ options: {+ sourceMap: true,+ importLoaders: 1+ }+ },+ {+ loader: 'sass-loader',+ options: {+ sourceMap: true}- ],- fallback: 'style-loader',- })+ }+ ]},// Add SASS support - compile all other .scss files and pipe it to style.css{- test: /^((?!\.global).)*\.scss$/,- use: ExtractTextPlugin.extract({- use: [{+ test: /^((?!\.global).)*\.(scss|sass)$/,+ use: [+ {+ loader: MiniCssExtractPlugin.loader+ },+ {loader: 'css-loader',options: {modules: true,importLoaders: 1,localIdentName: '[name]__[local]__[hash:base64:5]',+ sourceMap: true}},{- loader: 'sass-loader'- }]- }),- },- // Add LESS support - compile all other .less files and pipe it to style.css- {- test: /\.less$/,- use: ExtractTextPlugin.extract({- use: [{- loader: 'css-loader'- }, {- loader: 'less-loader'- }],- // use style-loader in development- fallback: 'style-loader'- })+ loader: 'sass-loader',+ options: {+ sourceMap: true+ }+ }+ ]},// Fonts{@@ -139,7 +153,9 @@ export default merge.smart(baseConfig, {new webpack.IgnorePlugin(/electron-io/),- new ExtractTextPlugin('style.css'),+ new MiniCssExtractPlugin({+ filename: 'style.css'+ }),],});