Skip to content

Build in version 4.8.13 + produces only .min.js #42

Description

@Regnar110

I noticed that in version 4.8.13 of js-cloudimage-responsive, the build process now produces only minified .min.js files in the dist folder, whereas previous versions also included non-minified .js files.

This change is probably likely caused by the .babelrc update that enables minification in the production environment:
"env": {
"production": {
"minify": {
"presets": [
"minify",
"@babel/preset-env",
["babel-preset-minify", { "builtIns": false }]
]
}
}
}

With the current configuration, after installing the package and running command in CLI:
node -e "require('js-cloudimage-responsive')"
we get the following error:

Error: Cannot find module '/node_modules/js-cloudimage-responsive/dist/low-preview/index.js'.
Please verify that the package.json has a valid "main" entry.

Given the current package configuration, is the following entry in package.json correct?

"main": "dist/low-preview/index.js"
It seems that with the recent changes (e.g., minification in .babelrc), this path might no longer exist or be generated.

Could you clarify whether this "main" entry is still valid, and if not, suggest the correct entry so that the package can be imported via require()?

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions