initialisation on the doormile express console with astryx
This commit is contained in:
@@ -1,7 +1,29 @@
|
||||
const webpack = require('webpack');
|
||||
const WorkBoxPlugin = require('workbox-webpack-plugin');
|
||||
|
||||
// NOTE on Astryx + StyleX custom styling (xstyle / stylex.create()):
|
||||
// @stylexjs/babel-plugin alone only transforms the JS call sites — it does
|
||||
// NOT inject the generated CSS. That requires a matching bundler plugin
|
||||
// (@stylexjs/webpack-plugin), which is stuck at 0.11.1 and pins its own
|
||||
// internal @stylexjs/babel-plugin@0.11.1 — two majors behind the 0.19.x
|
||||
// core that this Astryx version requires, so the two would hash class
|
||||
// names differently and produce the exact same "styled but invisible"
|
||||
// bug either way. Until StyleX's webpack tooling catches up (or we write
|
||||
// a custom metadata-collecting loader), custom Astryx styling is limited
|
||||
// to component props; anything a prop can't express uses a plain native
|
||||
// element with an inline `style` (StyleX-free, so it isn't affected).
|
||||
// See themes/astryx.js and pages/nearle/login.js.
|
||||
|
||||
module.exports = function override(config) {
|
||||
// @astryxdesign/core ships as ESM with relative imports missing extensions
|
||||
// (e.g. '../Tooltip/Tooltip'), which webpack 5 rejects under strict ESM
|
||||
// resolution. Relax it for this package only rather than globally.
|
||||
config.module.rules.push({
|
||||
test: /\.m?js$/,
|
||||
include: /node_modules[\\/]@astryxdesign/,
|
||||
resolve: { fullySpecified: false }
|
||||
});
|
||||
|
||||
config.resolve.fallback = {
|
||||
process: require.resolve('process/browser'),
|
||||
// zlib: require.resolve('browserify-zlib'),
|
||||
|
||||
Reference in New Issue
Block a user