oracle / oracle/ojet-cli

Invalid theme path on Windows Webpack release build

Open
#19 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
24
Forks
13
PR merge metrics
No merged PRs in 30d

Description

When building for release on Windows, the path to the theme css file is invalid.
The forwards slashes "/" becomes backslash "" and Webpack chooses to url encode those before inserting into index.html.

For a theme named "brandsync" the wrong import then becomes:
<link href="/styles/brandsync%5C0.0.1%5Cweb%5Cbrandsync.18849624e209bb95383d.css" rel="stylesheet">

It should have been:
<link href="/styles/brandsync/0.0.1/web/brandsync.18849624e209bb95383d.css" rel="stylesheet">

Fable's response as to where in the CLI you'll have to make the fix
Image

Tested with CLI 21 and these packages

  "dependencies": {
    "@fortawesome/fontawesome-svg-core": "^6.5.1",
    "@fortawesome/free-regular-svg-icons": "^6.5.1",
    "@fortawesome/free-solid-svg-icons": "^6.5.1",
    "@fortawesome/react-fontawesome": "^0.1.18",
    "@oracle/oraclejet": "^21.0.0",
    "@oracle/oraclejet-core-pack": "^21.0.0",
    "immer": "^9.0.15",
    "lodash": "^4.17.21",
    "lodash.clonedeep": "^4.5.0",
    "lodash.isequal": "^4.5.0",
    "luxon": "^3.2.1",
    "react-query": "^3.34.16",
    "react-router-dom": "^7.18.2"
  },
  "devDependencies": {
    "@oracle/oraclejet-tooling": "~21.0.1",
    "@prefresh/babel-plugin": "^0.5.1",
    "@prefresh/webpack": "^4.0.6",
    "@types/luxon": "^3.2.0",
    "clean-webpack-plugin": "^4.0.0",
    "compression-webpack-plugin": "^12.0.0",
    "copy-webpack-plugin": "^14.0.0",
    "css-fix-url-loader": "^1.0.2",
    "css-loader": "^7.1.2",
    "fork-ts-checker-webpack-plugin": "^7.2.13",
    "fs-extra": "^8.1.0",
    "glob": "^12.0.0",
    "html-replace-webpack-plugin": "2.6.0",
    "html-webpack-plugin": "^5.6.5",
    "mini-css-extract-plugin": "^2.9.4",
    "noop-loader": "1.0.0",
    "raw-loader": "4.0.2",
    "sass": "^1.97.1",
    "sass-loader": "^16.0.6",
    "style-loader": "^4.0.0",
    "ts-loader": "^8.4.0",
    "typescript": "^5.8.3",
    "underscore": "^1.13.7",
    "vitest": "^4.1.10",
    "webpack": "^5.98.0",
    "webpack-dev-server": "^5.2.2",
    "webpack-merge": "^6.0.1",
    "yargs-parser": "13.1.2"
  }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the CLI's release-build path that generates the theme CSS link, using the Windows reproduction and the attached Fable guidance to locate the path handling. Verify the generated index.html for a theme such as brandsync, and consider the issue complete when its URL uses forward-slash separators rather than encoded backslashes.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.