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

Allow for subdirectories in snippets/ and sections/ #781

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions packages/slate-tools/tools/webpack/config/parts/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,29 @@ module.exports = {
test: /\.(liquid|json)$/,
exclude: [
new RegExp('assets/styles'),
new RegExp('sections'),
new RegExp('snippets'),
...config.get('webpack.commonExcludes'),
],
loader: 'file-loader',
options: {
name: '../[path][name].[ext]',
},
},
{
test: /snippets\/.*\.liquid$/,
loader: 'file-loader',
options: {
name: `../snippets/[name].[ext]`,
},
},
{
test: /sections\/.*\.liquid$/,
loader: 'file-loader',
options: {
name: `../sections/[name].[ext]`,
},
},
{
test: /assets\/static\//,
exclude: /node_modules/,
Expand Down