Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

error when processing .js file that has .json substring #53

Open
jiixing opened this issue May 12, 2021 · 0 comments
Open

error when processing .js file that has .json substring #53

jiixing opened this issue May 12, 2021 · 0 comments

Comments

@jiixing
Copy link

jiixing commented May 12, 2021

Found a bug when including core-js package in brunch

This package has two files with .json substring in it

https://github.com/zloirock/core-js/blob/ae33634b34/packages/core-js/modules/es.json.stringify.js
https://github.com/zloirock/core-js/blob/ae33634b34/packages/core-js/modules/es.json.to-string-tag.js

The code in

if (filePath.indexOf('.json') === -1) {

should be changed to

  if (filePath.endsWith('.json') === false) {
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant