Skip to content

Commit

Permalink
fix(build): remove not working media queries splitting
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiandg7 committed Mar 30, 2021
1 parent 49eb36b commit 72351e1
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 29 deletions.
1 change: 0 additions & 1 deletion packages/nx-shopify/src/executors/build/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export interface BuildExecutorSchema {
main: string;
tsConfig: string;
postcssConfig: string;
mediaQueriesConfig: string;
themekitConfig: string;

watch?: boolean;
Expand Down
7 changes: 2 additions & 5 deletions packages/nx-shopify/src/executors/build/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
"type": "string",
"description": "The path to the PostCSS configuration file"
},
"mediaQueriesConfig": {
"type": "string",
"description": "The path to the media-queries configuration file"
},
"watch": {
"type": "boolean",
"description": "Run build when files change",
Expand Down Expand Up @@ -88,7 +84,8 @@
},
"memoryLimit": {
"type": "number",
"description": "Memory limit for type checking service process in MB. (defaults to 2048)"
"description": "Memory limit for type checking service process in MB.",
"default": 2048
},
"fileReplacements": {
"description": "Replace files with other files in the build.",
Expand Down
4 changes: 0 additions & 4 deletions packages/nx-shopify/src/generators/theme/theme.generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ function addBuildTarget(
main: joinPathFragments(sourceRoot, `main.ts`),
tsConfig: joinPathFragments(projectRoot, `tsconfig.app.json`),
postcssConfig: joinPathFragments(projectRoot, `postcss.config.js`),
mediaQueriesConfig: joinPathFragments(
projectRoot,
`media-queries.config.js`
),
themekitConfig: joinPathFragments(projectRoot, `config.yml`),
sourceMap: true,
assets: [joinPathFragments(projectRoot, `src/assets`)],
Expand Down
2 changes: 0 additions & 2 deletions packages/nx-shopify/src/utils/normalize-utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { normalizePath } from '@nrwl/devkit';
import { statSync } from 'fs';
import { basename, dirname, resolve } from 'path';
Expand Down Expand Up @@ -79,7 +78,6 @@ export function normalizeBuildOptions<T extends BuildExecutorSchema>(
sourceRoot: sourceRoot,
outputPath: resolve(root, options.outputPath),
tsConfig: resolve(root, options.tsConfig),
mediaQueriesConfig: resolve(root, options.mediaQueriesConfig),
fileReplacements: normalizeFileReplacements(root, options.fileReplacements),
assets: options.assets
? normalizeAssets(options.assets, root, sourceRoot)
Expand Down
17 changes: 0 additions & 17 deletions packages/nx-shopify/src/webpack/configs/partials/styles.config.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,9 @@
import * as MediaQuerySplittingPlugin from 'media-query-splitting-plugin';
import * as MiniCssExtractPlugin from 'mini-css-extract-plugin';
import { Configuration, Plugin } from 'webpack';
import { BuildExecutorSchema } from '../../../executors/build/schema';

function getExtraPlugins(options: BuildExecutorSchema) {
const extraPlugins: Plugin[] = [];

const { mediaQueriesConfig } = options;

if (mediaQueriesConfig) {
const mediaQueries = require(mediaQueriesConfig);

if (typeof mediaQueries === 'object' && mediaQueries !== null) {
extraPlugins
.push
// new MediaQuerySplittingPlugin({
// media: mediaQueries,
// minify: true,
// })
();
}
}
return extraPlugins;
}

Expand Down

0 comments on commit 72351e1

Please sign in to comment.