diff --git a/package.json b/package.json index 1a8f50d5d..5e9425e35 100644 --- a/package.json +++ b/package.json @@ -22,9 +22,9 @@ ], "scripts": { "clean": "lerna clean", - "start": "lerna exec --parallel -- npm run start", + "start": "lerna run dev --scope=playground --stream", "test": "cd library && npm test", - "build": "npm run build:library && npm run build:webcomponent && npm run build:playground", + "build": "npm run build:watch & lerna run dev --scope=playground --stream", "build:library": "cd library && npm run prepare", "build:webcomponent": "cd web-component && npm run bundle", "build:playground": "cd playground && npm run build", diff --git a/playground/next.config.mjs b/playground/next.config.mjs index 274ead23c..65787222c 100644 --- a/playground/next.config.mjs +++ b/playground/next.config.mjs @@ -16,18 +16,33 @@ const nextConfig = { compiler: { styledComponents: true, }, - webpack: config => { - config.resolve.fallback = { - fs: false, - }; + + webpack: (config, { isServer }) => { + if (!isServer) { + config.resolve.fallback = { + ...config.resolve.fallback, + fs: false, + path: false, + util: false, + buffer: false, + }; + } return config; }, + + + transpilePackages: [ + '@asyncapi/parser', + '@asyncapi/avro-schema-parser', + '@stoplight/spectral-core', + '@stoplight/spectral-ref-resolver', + '@stoplight/json-ref-readers', + 'avsc' + ], + assetPrefix, basePath, - eslint: { - ignoreDuringBuilds: true, - }, }; export default nextConfig; diff --git a/playground/package.json b/playground/package.json index b79044771..49ce8c4f3 100644 --- a/playground/package.json +++ b/playground/package.json @@ -2,8 +2,10 @@ "name": "playground", "private": true, "scripts": { - "build": "next build && touch out/.nojekyll", - "start": "next dev" + "dev": "next dev --webpack", + "dev:turbo": "next dev", + "build": "next build --webpack && touch out/.nojekyll", + "start": "next dev --webpack" }, "dependencies": { "@asyncapi/react-component": "file:../library",