Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Commit

Permalink
Merge pull request #883 from Shopify/fix-liquid-styles
Browse files Browse the repository at this point in the history
Fix liquid styles not uploading to Shopify
  • Loading branch information
t-kelly authored Nov 22, 2018
2 parents 5a115cf + f555f82 commit ee43c20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
6 changes: 5 additions & 1 deletion packages/slate-tools/tools/asset-server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,15 @@ module.exports = class DevServer {
_isChunk(key, chunks) {
return (
chunks.filter((chunk) => {
return key.indexOf(chunk.id) > -1;
return key.indexOf(chunk.id) > -1 && !this._isLiquidStyle(key);
}).length > 0
);
}

_isLiquidStyle(key) {
return key.indexOf('styleLiquid.scss.liquid') > -1;
}

_hasAssetChanged(key, asset) {
const oldHash = this.assetHashes[key];
const newHash = this._updateAssetHash(key, asset);
Expand Down
10 changes: 1 addition & 9 deletions packages/slate-tools/tools/webpack/config/parts/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,14 @@ module.exports = {
{
test: /\.(liquid|json)$/,
exclude: [
new RegExp('assets/styles'),
/(css|scss|sass)\.liquid$/,
...config.get('webpack.commonExcludes'),
],
loader: 'file-loader',
options: {
name: '../[path][name].[ext]',
},
},
{
test: /assets\/static\//,
exclude: /node_modules/,
loader: 'file-loader',
options: {
name: '[name].[ext]',
},
},
{
test: /(css|scss|sass)\.liquid$/,
exclude: config.get('webpack.commonExcludes'),
Expand Down

0 comments on commit ee43c20

Please sign in to comment.