You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.
extract-loader causing build to fail when attempting to include an asset url to a .scss file
Example output:
./layout/checkout.liquid
Module build failed (from ../node_modules/@shopify/slate-tools/node_modules/extract-loader/lib/extractLoader.js):
NonErrorEmittedError: (Emitted value instead of an instance of Error) ReferenceError: require is not defined
at runLoaders (/Users/mattclough/Repos/ng-theme/node_modules/@shopify/slate-tools/node_modules/webpack/lib/NormalModule.js:283:13)
at /Users/mattclough/Repos/ng-theme/node_modules/loader-runner/lib/LoaderRunner.js:364:11
at /Users/mattclough/Repos/ng-theme/node_modules/loader-runner/lib/LoaderRunner.js:230:18
at context.callback (/Users/mattclough/Repos/ng-theme/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)
@ . sync ^\.\/layout.*\.liquid$ ./layout/checkout.liquid
@ ../node_modules/@shopify/slate-tools/tools/webpack/static-files-glob.js
@ multi ../node_modules/@shopify/slate-tools/tools/webpack/hot-client.js ../node_modules/@shopify/slate-tools/tools/webpack/static-files-glob.js
Replication steps
Run yarn start to start compilation of theme
Create a .scss file
In a liquid template, try including the stylesheet using its relative path, e.g.: {{ '../assets/styles/new-style.scss' | asset_url | stylesheet_tag }}
Problem
extract-loader
causing build to fail when attempting to include an asset url to a.scss
fileExample output:
Replication steps
yarn start
to start compilation of theme.scss
file{{ '../assets/styles/new-style.scss' | asset_url | stylesheet_tag }}
More Information
This may be fixed by upgrading
extract-loader
as noted here:peerigon/extract-loader#2
UPDATE
Forked and upgraded extract-loader. The above error is replaced by a similar error
require(...) is not a function
The text was updated successfully, but these errors were encountered: