chore(demoing-storybook): construct URL with import.meta.url

This commit is contained in:
Lars den Bakker
2020-04-12 18:00:16 +02:00
committed by Thomas Allmer
parent c9748bf34e
commit a9c33e6613
2 changed files with 7 additions and 2 deletions

View File

@@ -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() {

View File

@@ -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);
}