From 7149f7c0d0fb222bc5a22c349cde1b9f13ee24a1 Mon Sep 17 00:00:00 2001 From: Leonardo Matos Date: Fri, 3 Apr 2020 04:08:14 -0300 Subject: [PATCH] build(webpack): alias to empty scss for preimported component styles [skip ci] --- .../storefront-template/__fixtures__/empty.scss | 0 @ecomplus/storefront-template/storefront.webpack.js | 13 +++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 @ecomplus/storefront-template/__fixtures__/empty.scss diff --git a/@ecomplus/storefront-template/__fixtures__/empty.scss b/@ecomplus/storefront-template/__fixtures__/empty.scss new file mode 100644 index 000000000..e69de29bb diff --git a/@ecomplus/storefront-template/storefront.webpack.js b/@ecomplus/storefront-template/storefront.webpack.js index 40c21fbb5..49ef71644 100644 --- a/@ecomplus/storefront-template/storefront.webpack.js +++ b/@ecomplus/storefront-template/storefront.webpack.js @@ -1,7 +1,20 @@ +const path = require('path') +const emptyScss = path.resolve(__dirname, '__fixtures__/empty.scss') + module.exports = { externals: { + // imported from CDN vue: 'Vue', jquery: '$', 'popper.js': 'Popper' + }, + resolve: { + alias: { + // components SCSS directly imported to styles.scss + './scss/APicture.scss': emptyScss, + './scss/APrices.scss': emptyScss, + './scss/ProductCard.scss': emptyScss, + './scss/TheProduct.scss': emptyScss + } } }