Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Load styles for PDF files using render_bundle
Marcin Gębala31c9a52d5a74
diff --git a/saleor/static/dashboard/js/document.js b/saleor/static/dashboard/js/document.jsnew file mode 100644index 0000000000..b0a649e15f--- /dev/null+++ b/saleor/static/dashboard/js/document.js@@ -0,0 +1 @@+import '../scss/document.scss';\ No newline at end of filediff --git a/templates/dashboard/order/pdf/invoice.html b/templates/dashboard/order/pdf/invoice.htmlindex 77ac0be374..b1064a88d8 100644--- a/templates/dashboard/order/pdf/invoice.html+++ b/templates/dashboard/order/pdf/invoice.html@@ -1,12 +1,12 @@{% load i18n static %}{% load prices_i18n %}{% load discount_amount_for from prices %}-{% load static %}+{% load render_bundle from webpack_loader %}<html><head><title>{% trans "Invoice for Order" context "Invoice title" %} #{{ order.id }}</title>- <link rel="stylesheet" type="text/css" href="{% static '/assets/document.css' %}"/>+ {% render_bundle 'document' 'css' %}</head><body><header>diff --git a/webpack.config.js b/webpack.config.jsindex 03aec76476..0a7e72c48f 100644--- a/webpack.config.js+++ b/webpack.config.js@@ -61,8 +61,8 @@ var faviconsWebpackPlugin = new FaviconsWebpackPlugin({var config = {entry: {dashboard: './saleor/static/dashboard/js/dashboard.js',+ document: './saleor/static/dashboard/js/document.js',storefront: './saleor/static/js/storefront.js',- document: './saleor/static/dashboard/scss/document.scss',vendor: ['babel-es6-polyfill','bootstrap',