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

Unminified.js #6143

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Unminified.js #6143

wants to merge 3 commits into from

Conversation

mmkal
Copy link
Contributor

@mmkal mmkal commented Jan 21, 2022

Fixes #6104

Not ready yet but CC @erezrokah

Summary

Produces unminified js.

Test plan

  • yarn build in netlify-cms-core, it works and produces the right files
  • yarn build in the repo root

Checklist

Please add a x inside each checkbox:

  • I have read the contribution guidelines.
  • Code is formatted via running yarn format.
  • Tests are passing via running yarn test.
  • The status checks are successful (continuous integration). Those can be seen below.

A picture of a cute animal (not mandatory but encouraged)

best I can do is 🐈

@@ -1,5 +1,6 @@
const path = require('path');
const webpack = require('webpack');
const TerserPlugin = require("terser-webpack-plugin");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to me: this should be added as an explicit dependency, it's only available because of yarn/lerna hoisting.

@@ -79,12 +83,13 @@ function targetOutputs() {
return {
umd: {
path: umdPath,
filename: `${pkg.name}.js`,
filename: pathData => pathData.chunk.name === 'minified' ? `${pkg.name}.js` : `${pkg.name}.[name].js`,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@erezrokah know if I need to do something similar to this for all the other target ouputs?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me check how we're using the other targets and follow up

@erezrokah erezrokah added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Jan 24, 2022
@stale
Copy link

stale bot commented Apr 26, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@mmkal
Copy link
Contributor Author

mmkal commented May 22, 2023

@martinjagodic I'd still like a solution to #6104 but I imagine this is out of date now - are you planning on sticking with webpack + a custom build config? I would have thought in 2023 and with the significant netlify->decap overhaul it'd be better to switch to something like microbundle which can take care of pretty much everything without worrying much about configuration. Or, use turbopack in anticipation of it getting out of beta and becoming the de-facto webpack successor (usually a good idea to bet on Vercel!).

If you disagree, feel free to reopen this and I may be able to find some time to fix up the build.

@mmkal mmkal closed this May 22, 2023
@mmkal mmkal deleted the unminified.js branch May 22, 2023 11:26
@martinjagodic
Copy link
Member

Yes, we need unminified JS. I believe that build tools are not on the radar yet. @demshy do you have any comments on this? I guess we will have to revisit this soon.

@mmkal mmkal restored the unminified.js branch May 22, 2023 11:38
@mmkal mmkal reopened this May 22, 2023
@netlify
Copy link

netlify bot commented May 22, 2023

Deploy Preview for decap-www canceled.

Name Link
🔨 Latest commit 8996818
🔍 Latest deploy log https://app.netlify.com/sites/decap-www/deploys/646b5458aa63a400073e77d6

@mmkal
Copy link
Contributor Author

mmkal commented May 22, 2023

Ok, I've reopened and updated. If it goes green I can't see any great harm in it going in like this, the build tools could always be updated afterwards. Over a year ago I said it wasn't ready, I don't remember what was missing exactly but maybe not much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Un-minified bundled js
3 participants