A space to discuss and keep up software development and manage your software career
News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more.
A general discussion space for the Forem community. If it doesn't have a home elsewhere, it belongs here
An inclusive community for gaming enthusiasts
From composing and gigging to gear, hot music takes, and everything in between.
Discussing AI software development, and showing off what we're building.
Memes and software development shitposting
Movie and TV enthusiasm, criticism and everything in-between.
Web design, graphic design and everything in-between
Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike
A community of golfers and golfing enthusiasts
A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis.
A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We're here for them and for each other.
Discussing the core forem open source software project — features, bugs, performance, self-hosting.
A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more.
For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating
That could be an issue related to how big the project is, and that is probably more webpack related.
We have large TypeScript/React projects and ended up using Happy Pack and fork-ts-checker-webpack-plugin to speed up things.
I was able to bring an initial build time down from 2 minutes to 30 seconds with subsequent super fast HMR thanks to these great projects.
So thanks to custom webpack configs in Storybook, we were able to apply these plugins to Storybook as well.
Wow, that looks cool! Could we use that by default do you think?
You probably could. It's pretty minimal webpack changes. You include a plugin/loader and you're good to go. Here's the current TypeScript/React project I'm working on's webpack config for Storybook
/** * This extends the default webpack configuration used in storybook. */ const { resolve } = require('path'); const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); const HappyPack = require('happypack'); module.exports = { devtool: 'cheap-module-source-map', resolve: { extensions: ['.ts', '.tsx', '.js'], alias: { types: resolve(__dirname, '../types'), helpers: resolve(__dirname, '../src', 'helpers'), services: resolve(__dirname, '../src', 'services'), reducers: resolve(__dirname, '../src', 'reducers'), actions: resolve(__dirname, '../src', 'actions'), components: resolve(__dirname, '../src', 'components'), routes: resolve(__dirname, '../src', 'routes'), utilities: resolve(__dirname, '../src', 'utilities'), assets: resolve(__dirname, '../src', 'assets'), }, }, module: { rules: [ { test: /\.tsx?$/, exclude: /node_modules/, loader: 'happypack/loader?id=ts', }, ], }, plugins: [ new HappyPack({ id: 'ts', threads: 2, loaders: [ { path: 'ts-loader', query: { happyPackMode: true }, }, ], }), // Handles type checking on another thread. new ForkTsCheckerWebpackPlugin({ async: false, tslint: true, checkSyntacticErrors: true, }), ], };
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
That could be an issue related to how big the project is, and that is probably more webpack related.
We have large TypeScript/React projects and ended up using Happy Pack and fork-ts-checker-webpack-plugin to speed up things.
I was able to bring an initial build time down from 2 minutes to 30 seconds with subsequent super fast HMR thanks to these great projects.
So thanks to custom webpack configs in Storybook, we were able to apply these plugins to Storybook as well.
Wow, that looks cool! Could we use that by default do you think?
You probably could. It's pretty minimal webpack changes. You include a plugin/loader and you're good to go. Here's the current TypeScript/React project I'm working on's webpack config for Storybook