mirror of
https://github.com/jlengrand/open-wc.git
synced 2026-03-10 08:31:19 +00:00
chore(demoing-storybook): construct URL with import.meta.url
This commit is contained in:
committed by
Thomas Allmer
parent
c9748bf34e
commit
a9c33e6613
@@ -3,7 +3,10 @@ const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
stories: ['../stories/**/*.stories.{js,mdx,md}'],
|
||||
addons: ['storybook-prebuilt/addon-docs/register.js'],
|
||||
addons: [
|
||||
'storybook-prebuilt/addon-docs/register.js',
|
||||
'storybook-prebuilt/addon-knobs/register.js',
|
||||
],
|
||||
rollup: config => {
|
||||
config.plugins.push({
|
||||
generateBundle() {
|
||||
|
||||
@@ -19,7 +19,9 @@ addParameters({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const customElements = await fetch(new URL('../custom-elements.json')).json();
|
||||
const customElements = await (
|
||||
await fetch(new URL('../custom-elements.json', import.meta.url))
|
||||
).json();
|
||||
|
||||
setCustomElements(customElements);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user