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
Hi,
we're using scss in our project with module exports and namedExport: false (which is the default). I'm trying to add an npm package that has default exports and from some general research i think that this is the right direction and that i need to set namedExport to true for it, but i don't want to apply it to all project, just to that npm package.
i was thinking something in this direction, but couldn't get it to work:
// modern.config.tsexportdefaultdefineConfig({runtime: {router: true,},output: {cssModules: {// i want this, but only for specific package in `node_modules`namedExport : true,},},tools: {rspack: {module: {rules: [// maybe something like this?{test: /\.scss$/,include: /[\\/]node_modules[\\/]faulty-package[\\/]/,type: 'css-loader',options: {auto: true,namedExport: false,},},],},},},});
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
we're using
scssin our project with module exports andnamedExport: false(which is the default). I'm trying to add an npm package that has default exports and from some general research i think that this is the right direction and that i need to setnamedExporttotruefor it, but i don't want to apply it to all project, just to that npm package.i was thinking something in this direction, but couldn't get it to work:
any idea how to do this?
Beta Was this translation helpful? Give feedback.
All reactions