From be9148ae8cea16739aeab09dc11695b3e515e7b0 Mon Sep 17 00:00:00 2001 From: Ben Scott Date: Fri, 21 May 2021 15:05:25 -0700 Subject: [PATCH] Updates to ensure files get included in build output --- packages/address-mocks/src/fixtures/index.ts | 60 ++++++++++---------- packages/useful-types/src/index.ts | 3 + packages/web-worker/sewing-kit.config.ts | 1 + 3 files changed, 33 insertions(+), 31 deletions(-) diff --git a/packages/address-mocks/src/fixtures/index.ts b/packages/address-mocks/src/fixtures/index.ts index 6c7f96925e..a409b0ce3f 100644 --- a/packages/address-mocks/src/fixtures/index.ts +++ b/packages/address-mocks/src/fixtures/index.ts @@ -3,15 +3,13 @@ import { LoadCountryResponse, } from '@shopify/address-consts'; -/* eslint-disable @typescript-eslint/no-var-requires */ -const countryCAFr: LoadCountryResponse = require('./country_ca_fr').default; -const countryCAEn: LoadCountryResponse = require('./country_ca_en').default; -const countryCAJa: LoadCountryResponse = require('./country_ca_ja').default; -const countryCAAf: LoadCountryResponse = require('./country_ca_af').default; -const countriesEn: LoadCountriesResponse = require('./countries_en').default; -const countriesJa: LoadCountriesResponse = require('./countries_ja').default; -const countriesAF: LoadCountriesResponse = require('./countries_af').default; -/* eslint-enable @typescript-eslint/no-var-requires */ +import countryCAFr from './country_ca_fr'; +import countryCAEn from './country_ca_en'; +import countryCAJa from './country_ca_ja'; +import countryCAAf from './country_ca_af'; +import countriesEn from './countries_en'; +import countriesJa from './countries_ja'; +import countriesAF from './countries_af'; interface Fixtures { countries: { @@ -24,29 +22,29 @@ interface Fixtures { export const fixtures: Fixtures = { countries: { - AF: countriesAF, - DA: countriesEn, - DE: countriesEn, - EN: countriesEn, - ES: countriesEn, - FR: countriesEn, - IT: countriesEn, - JA: countriesJa, - NL: countriesEn, - PT: countriesEn, - PT_BR: countriesEn, + AF: countriesAF as LoadCountriesResponse, + DA: countriesEn as LoadCountriesResponse, + DE: countriesEn as LoadCountriesResponse, + EN: countriesEn as LoadCountriesResponse, + ES: countriesEn as LoadCountriesResponse, + FR: countriesEn as LoadCountriesResponse, + IT: countriesEn as LoadCountriesResponse, + JA: countriesJa as LoadCountriesResponse, + NL: countriesEn as LoadCountriesResponse, + PT: countriesEn as LoadCountriesResponse, + PT_BR: countriesEn as LoadCountriesResponse, }, country: { - AF: countryCAAf, - DA: countryCAEn, - DE: countryCAEn, - EN: countryCAEn, - ES: countryCAEn, - FR: countryCAFr, - IT: countryCAEn, - JA: countryCAJa, - NL: countryCAEn, - PT: countryCAEn, - PT_BR: countryCAEn, + AF: countryCAAf as LoadCountryResponse, + DA: countryCAEn as LoadCountryResponse, + DE: countryCAEn as LoadCountryResponse, + EN: countryCAEn as LoadCountryResponse, + ES: countryCAEn as LoadCountryResponse, + FR: countryCAFr as LoadCountryResponse, + IT: countryCAEn as LoadCountryResponse, + JA: countryCAJa as LoadCountryResponse, + NL: countryCAEn as LoadCountryResponse, + PT: countryCAEn as LoadCountryResponse, + PT_BR: countryCAEn as LoadCountryResponse, }, }; diff --git a/packages/useful-types/src/index.ts b/packages/useful-types/src/index.ts index fcb073fefc..4527bf891b 100644 --- a/packages/useful-types/src/index.ts +++ b/packages/useful-types/src/index.ts @@ -1 +1,4 @@ export * from './types'; + +// Empty export to make sure this file has valid js output +export const __ensureNonEmptyFile = ''; diff --git a/packages/web-worker/sewing-kit.config.ts b/packages/web-worker/sewing-kit.config.ts index 2077e01985..9698df8c5c 100644 --- a/packages/web-worker/sewing-kit.config.ts +++ b/packages/web-worker/sewing-kit.config.ts @@ -7,6 +7,7 @@ export default createPackage(pkg => { pkg.entry({root: './src/index'}); pkg.entry({name: 'babel', root: './src/babel-plugin'}); pkg.entry({name: 'webpack', root: './src/webpack-parts'}); + pkg.entry({name: 'webpack-loader', root: './src/webpack-parts/loader'}); pkg.entry({name: 'worker', root: './src/worker'}); pkg.use(quiltPackage()); });