Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass all files other then node_modules though babel loader by default #6566

Closed
wants to merge 27 commits into from

Conversation

ndelangen
Copy link
Member

@ndelangen ndelangen commented Apr 19, 2019

Issue: #6047

What I did

REMOVE the include lists for the babel-loader, this should enable transpiling for files
other then in your source directory, making the need for custom webpack configs less prominent.

ADD a thread-loader to hopefully speed up the building of large storybooks.

ADD a loader for css and a file-loader for other files.

Storybook will now transpile all files through babel as long as /node_modules/ doesn't exists in the file's path.

This is a breaking change

This makes it easier for users to write their addons locally and have them be transpiled by webpack/babel.

UPGRADE to core-js 3

REMOVE alias for core-js

CHANGE transpile strategy: transpile to ES modules for better tree-shaking.

REMOVE the include lists for the babel-loader, this should enable transpiling for files
other then in your source directory, making the need for custom webpack configs less prominent

ADD a thread-loader to hopefully speed up the building of large storybooks
@vercel
Copy link

vercel bot commented Apr 19, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://monorepo-git-tech-loader-scope-changes.storybook.now.sh

@ndelangen ndelangen changed the title OPTIMIZE webpack & babel Pass all files other then node_modules though babel loader by default Apr 19, 2019
@github-actions
Copy link
Contributor

github-actions bot commented Apr 19, 2019

Fails
🚫 PR is marked with "do not merge", "BREAKING CHANGE" labels.

Generated by 🚫 dangerJS against 9f28b8e

@codecov
Copy link

codecov bot commented Apr 19, 2019

Codecov Report

Merging #6566 into next will increase coverage by 4.92%.
The diff coverage is 31.5%.

Impacted file tree graph

@@            Coverage Diff            @@
##            next    #6566      +/-   ##
=========================================
+ Coverage   40.4%   45.33%   +4.92%     
=========================================
  Files        637      638       +1     
  Lines       8778     8799      +21     
  Branches     643      644       +1     
=========================================
+ Hits        3547     3989     +442     
+ Misses      5133     4697     -436     
- Partials      98      113      +15
Impacted Files Coverage Δ
...b/core/src/server/preview/iframe-webpack.config.js 0% <ø> (ø) ⬆️
addons/links/src/preview.ts 74.19% <ø> (+16.12%) ⬆️
addons/ondevice-notes/src/register.js 0% <ø> (ø) ⬆️
addons/knobs/src/registerKnobs.js 48.71% <ø> (+48.71%) ⬆️
lib/ui/scripts/webpackDllsConfig.js 0% <ø> (ø) ⬆️
addons/storysource/src/preview.js 0% <ø> (ø) ⬆️
addons/knobs/src/register.js 0% <ø> (ø) ⬆️
addons/jest/src/index.ts 66.66% <ø> (+66.66%) ⬆️
addons/options/src/register.ts 0% <ø> (ø) ⬆️
addons/contexts/src/register.ts 0% <ø> (ø) ⬆️
... and 124 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 55d3878...3eac27c. Read the comment docs.

@shilman shilman removed the maintenance User-facing maintenance tasks label Apr 20, 2019
tested edge as well
# Conflicts:
#	.gitignore
#	addons/actions/package.json
#	addons/backgrounds/package.json
#	addons/contexts/src/manager/libs/useChannel.ts
#	addons/contexts/src/preview/api.ts
#	addons/contexts/src/register.ts
#	addons/cssresources/package.json
#	addons/events/package.json
#	addons/google-analytics/package.json
#	addons/info/package.json
#	addons/jest/package.json
#	addons/notes/package.json
#	addons/ondevice-backgrounds/package.json
#	addons/ondevice-knobs/package.json
#	addons/ondevice-notes/package.json
#	addons/options/package.json
#	addons/storyshots/storyshots-core/package.json
#	addons/storyshots/storyshots-puppeteer/package.json
#	addons/storysource/package.json
#	addons/viewport/package.json
#	examples/angular-cli/jest.config.js
#	examples/official-storybook/webpack.config.js
#	lib/addons/package.json
#	lib/addons/src/index.ts
#	lib/addons/src/public_api.ts
#	lib/api/package.json
#	lib/channel-postmessage/package.json
#	lib/channel-websocket/package.json
#	lib/components/package.json
#	lib/core-events/src/index.ts
#	lib/router/package.json
#	lib/ui/package.json
#	yarn.lock
linting is broken, type exports are still imported, which causes errors, type imports aren't found
@vercel vercel bot temporarily deployed to staging April 27, 2019 00:39 Inactive
ndelangen added 2 commits May 7, 2019 01:23
# Conflicts:
#	addons/actions/package.json
#	addons/backgrounds/package.json
#	addons/cssresources/package.json
#	addons/events/package.json
#	addons/google-analytics/package.json
#	addons/info/package.json
#	addons/jest/package.json
#	addons/notes/package.json
#	addons/ondevice-backgrounds/package.json
#	addons/ondevice-knobs/package.json
#	addons/ondevice-notes/package.json
#	addons/options/package.json
#	addons/storyshots/storyshots-core/package.json
#	addons/storyshots/storyshots-puppeteer/package.json
#	addons/storysource/package.json
#	addons/viewport/package.json
#	app/react-native-server/src/client/manager/provider.js
#	app/react-native/src/preview/components/OnDeviceUI/addons/index.tsx
#	app/react-native/src/preview/components/StoryListView/index.tsx
#	app/react-native/src/preview/components/StoryView/index.tsx
#	lib/addons/package.json
#	lib/api/package.json
#	lib/channel-postmessage/package.json
#	lib/channel-websocket/package.json
#	lib/components/package.json
#	lib/router/package.json
#	lib/ui/package.json
ndelangen added 2 commits May 20, 2019 23:17
# Conflicts:
#	.babelrc.js
#	addons/actions/package.json
#	addons/backgrounds/package.json
#	addons/cssresources/package.json
#	addons/events/package.json
#	addons/google-analytics/package.json
#	addons/graphql/package.json
#	addons/info/package.json
#	addons/jest/package.json
#	addons/notes/package.json
#	addons/ondevice-backgrounds/package.json
#	addons/ondevice-knobs/package.json
#	addons/ondevice-notes/package.json
#	addons/options/package.json
#	addons/storyshots/storyshots-core/package.json
#	addons/storyshots/storyshots-core/src/frameworks/angular/loader.js
#	addons/storyshots/storyshots-puppeteer/package.json
#	addons/storysource/package.json
#	addons/viewport/package.json
#	app/angular/package.json
#	examples/cra-kitchen-sink/jest.config.js
#	jest.config.js
#	lib/addons/package.json
#	lib/api/package.json
#	lib/channel-postmessage/package.json
#	lib/channel-websocket/package.json
#	lib/components/package.json
#	lib/core/package.json
#	lib/core/src/server/common/babel.js
#	lib/core/src/server/common/polyfills.js
#	lib/core/src/server/manager/manager-webpack.config.js
#	lib/core/src/server/preview/iframe-webpack.config.js
#	lib/router/package.json
#	lib/theming/src/index.ts
#	lib/ui/package.json
#	lib/ui/scripts/createDlls.js
#	yarn.lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants