Skip to content

Commit

Permalink
improve config
Browse files Browse the repository at this point in the history
  • Loading branch information
fpbrault committed Sep 12, 2024
1 parent def9830 commit 5400461
Showing 1 changed file with 56 additions and 55 deletions.
111 changes: 56 additions & 55 deletions packages/atomic/stencil.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,61 +183,62 @@ export const config: Config = {
],
rollupPlugins: {
before: [
isDevWatch &&
alias({
entries: [
{
find: '@coveo/headless/case-assist',
replacement: path.resolve(
__dirname,
'./src/external-builds/case-assist/headless.esm.js'
),
},
{
find: '@coveo/headless/commerce',
replacement: path.resolve(
__dirname,
'./src/external-builds/commerce/headless.esm.js'
),
},
{
find: '@coveo/headless/recommendation',
replacement: path.resolve(
__dirname,
'./src/external-builds/recommendation/headless.esm.js'
),
},
{
find: '@coveo/headless/commerce',
replacement: path.resolve(
__dirname,
'./src/external-builds/commerce/headless.esm.js'
),
},
{
find: '@coveo/headless/product-recommendation',
replacement: path.resolve(
__dirname,
'./src/external-builds/product-recommendation/headless.esm.js'
),
},
{
find: '@coveo/headless/insight',
replacement: path.resolve(
__dirname,
'./src/external-builds/insight/headless.esm.js'
),
},
{
find: '@coveo/headless',
replacement: path.resolve(
__dirname,
'./src/external-builds/headless.esm.js'
),
},
],
}),
!isDevWatch && externalizeDependenciesPlugin(),
isDevWatch
? alias({
entries: [
{
find: '@coveo/headless/case-assist',
replacement: path.resolve(
__dirname,
'./src/external-builds/case-assist/headless.esm.js'
),
},
{
find: '@coveo/headless/commerce',
replacement: path.resolve(
__dirname,
'./src/external-builds/commerce/headless.esm.js'
),
},
{
find: '@coveo/headless/recommendation',
replacement: path.resolve(
__dirname,
'./src/external-builds/recommendation/headless.esm.js'
),
},
{
find: '@coveo/headless/commerce',
replacement: path.resolve(
__dirname,
'./src/external-builds/commerce/headless.esm.js'
),
},
{
find: '@coveo/headless/product-recommendation',
replacement: path.resolve(
__dirname,
'./src/external-builds/product-recommendation/headless.esm.js'
),
},
{
find: '@coveo/headless/insight',
replacement: path.resolve(
__dirname,
'./src/external-builds/insight/headless.esm.js'
),
},
{
find: '@coveo/headless',
replacement: path.resolve(
__dirname,
'./src/external-builds/headless.esm.js'
),
},
],
})
: externalizeDependenciesPlugin(),

html({
include: 'src/templates/**/*.html',
}),
Expand Down

0 comments on commit 5400461

Please sign in to comment.