You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of publishing tools separately as /config and /tools/dist, unify
the tsc builds so that everything ends up in /dist.
BREAKING CHANGE: consuming apps need to modify their imports
accordingly.
Co-authored-by: ChatGPT 5.2 <noreply@openai.com>
@@ -138,12 +138,25 @@ With the exception of any custom scripts, replace the `scripts` section of your
138
138
},
139
139
```
140
140
141
-
The `build` script compiles TypeScript to JavaScript and uses `tsc-alias` to rewrite `@src` path aliases to relative paths. You'll need to install `tsc-alias` as a dev dependency:
141
+
The `build` script invokes a Makefile target. You'll need to install `tsc-alias` as a dev dependency:
This target compiles TypeScript to JavaScript, uses `tsc-alias` to rewrite `@src` path aliases to relative paths, and copies all SCSS files from `src/` into `dist/` preserving directory structure.
159
+
147
160
- Replace `YOUR_PORT` with the desired port, of course.
148
161
- Replace `YOUR_APP_NAME` with the basename used on your site.config, not doing this will result in only the root route working.
149
162
- Note that `fedx-scripts` no longer exists, and has been replaced with `openedx`.
@@ -185,8 +198,8 @@ This means that the code from the library can be safely tree-shaken by webpack.
185
198
186
199
```json
187
200
"sideEffects": [
188
-
"*.css",
189
-
"*.scss"
201
+
"dist/**/*.css",
202
+
"dist/**/*.scss"
190
203
],
191
204
```
192
205
@@ -206,7 +219,7 @@ Finally, make sure the following fields are set properly:
206
219
Clean up .npmignore
207
220
===================
208
221
209
-
Since we use the `files` field in `package.json` to whitelist only `/dist`, the `.npmignore` file is largely unnecessary. You can delete it or keep a minimal version:
222
+
Since we use the `files` field in `package.json` to whitelist only `/dist`, the `.npmignore` file is largely unnecessary. You can keep a minimal version:
210
223
211
224
```
212
225
node_modules
@@ -262,7 +275,7 @@ Create a `tsconfig.json` file and add the following contents to it:
@@ -554,14 +565,14 @@ SVGR "ReactComponent" imports have been removed
554
565
We have removed the `@svgr/webpack` loader because it was incompatible with more modern tooling (it requires Babel). As a result, the ability to import SVG files into JS as the `ReactComponent` export no longer works. We know of a total of 5 places where this is happening today in Open edX MFEs - frontend-app-learning and frontend-app-profile use it. Please replace that export with the default URL export and set the URL as the source of an `<img>` tag, rather than using `ReactComponent`. You can see an example of normal SVG imports in `test-site/src/ExamplePage.tsx`.
555
566
556
567
557
-
Import createConfig and getBaseConfig from @openedx/frontend-base/config
568
+
Import createConfig and getBaseConfig from @openedx/frontend-base/dist/tools
In frontend-build, `createConfig` and `getBaseConfig` could be imported from the root package (`@openedx/frontend-build`). They have been moved to a sub-directory to make room for runtime exports from the root package (`@openedx/frontend-base`).
0 commit comments