parcel-namer-rewrite icon indicating copy to clipboard operation
parcel-namer-rewrite copied to clipboard

PARCEL-NAMER-REWRITE-PROFILE leads to error

Open kpotschi opened this issue 1 year ago • 1 comments

Hey there,

using

PARCEL-NAMER-REWRITE-PROFILE=development parcel build src/app.ts --no-source-maps --config .parcelrc.dev

throws the following error:

scripts/build.dev.sh: line 5: PARCEL-NAMER-REWRITE-PROFILE=development: command not found

it seems like it should be underscores, but i might just be on the wrong path completely. any help appreciated.

my package.json:

{
	...
	"packageManager": "[email protected]",
	"staticFiles": {
		"staticPath": "./src/assets",
		"staticOutPath": "./assets"
	},
	"parcel-namer-rewrite": {
		"profiles": {
			"development": {
				"rules": {
					"app.js": "tap-tap-ploom.min.dev.js"
				}
			},
			"production": {
				"rules": {
					"app.js": "tap-tap-ploom.min.js"
				}
			}
		}
	}
}

kpotschi avatar Nov 22 '23 09:11 kpotschi

Yes, dashes in environment variables are no good. Thanks for report!

I've changed "PARCEL-NAMER-REWRITE-PROFILE" to "PARCEL_NAMER_REWRITE_PROFILE" in version 2.10.3-rc.2

https://github.com/ol-loginov/parcel-namer-rewrite/commit/0bdcb0ee5494fe752db54d9f6cca10fbb26eb389

ol-loginov avatar Nov 22 '23 12:11 ol-loginov