Skip to content

Commit 83b5ba0

Browse files
committed
test
1 parent 34a47a6 commit 83b5ba0

File tree

3 files changed

+14
-28
lines changed

3 files changed

+14
-28
lines changed

examples/next-js/empty.css

Lines changed: 0 additions & 7 deletions
This file was deleted.

examples/next-js/next.config.mjs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ const nextConfig = {
3232
config.resolve.alias = {
3333
...config.resolve.alias,
3434
json5: require.resolve('json5/lib/index.js'),
35-
// Map the problematic CSS import to our empty file
36-
'~react-toastify/dist/ReactToastify.min.css': resolve(__dirname, 'empty.css'),
3735
};
3836

3937
// Add resolve modules to look in monorepo node_modules
@@ -42,25 +40,6 @@ const nextConfig = {
4240
resolve(__dirname, '../../node_modules'),
4341
'node_modules',
4442
];
45-
46-
// Handle ~ prefix imports by rewriting them to resolve from node_modules
47-
// The ~ prefix is a webpack convention that some packages use
48-
config.plugins.push(
49-
new webpack.NormalModuleReplacementPlugin(/^~/, (resource) => {
50-
// Get the path after the ~ prefix
51-
const requestPath = resource.request.substring(1);
52-
53-
// Special case: ignore react-toastify CSS that JupyterLab imports but we don't need
54-
if (requestPath.includes('react-toastify/dist/ReactToastify.min.css')) {
55-
// Replace with an empty CSS file from this directory
56-
resource.request = resolve(__dirname, 'empty.css');
57-
return;
58-
}
59-
60-
// For other ~ imports, resolve from node_modules
61-
resource.request = resolve(__dirname, '../../node_modules', requestPath);
62-
}),
63-
);
6443
config.module.rules.push(
6544
{ test: /\.js.map$/, type: 'asset/resource' },
6645
{
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/node_modules/@jupyterlab/apputils-extension/style/notification.css b/node_modules/@jupyterlab/apputils-extension/style/notification.css
2+
index f84dac3..9cf698c 100644
3+
--- a/node_modules/@jupyterlab/apputils-extension/style/notification.css
4+
+++ b/node_modules/@jupyterlab/apputils-extension/style/notification.css
5+
@@ -3,7 +3,8 @@
6+
* Distributed under the terms of the Modified BSD License.
7+
*/
8+
9+
-@import '~react-toastify/dist/ReactToastify.min.css';
10+
+/* Commented out to avoid webpack resolution issues with ~ prefix in Next.js */
11+
+/* @import '~react-toastify/dist/ReactToastify.min.css'; */
12+
13+
:root {
14+
--toastify-color-light: var(--jp-layout-color1);

0 commit comments

Comments
 (0)