Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hash] in fileName #778

Open
oudmane opened this issue Nov 22, 2024 · 3 comments · May be fixed by #815
Open

[hash] in fileName #778

oudmane opened this issue Nov 22, 2024 · 3 comments · May be fixed by #815
Labels
enhancement New feature or request

Comments

@oudmane
Copy link

oudmane commented Nov 22, 2024

Describe the feature request

Hello, I'm using the rollup plugin and I went to output the css file with a hash, I tried adding [hash] in fileName but it doesn't get replaced by a hash, can this feature be supported, if yes, how to do it (I can also implement it and make PR).

Many thanks.

import stylexPlugin from '@stylexjs/rollup-plugin';

const config = {
  input: './index.js',
  output: {
    file: './.build/bundle.js',
    format: 'es',
  },
  // Ensure that the stylex plugin is used before Babel
  plugins: [stylexPlugin({
    // Required. File path for the generated CSS file.
    fileName: './.build/stylex.[hash].css',
    // default: false
    dev: false,
    // prefix for all generated classNames
    classNamePrefix: 'x',
    // Required for CSS variable support
    unstable_moduleResolution: {
      // type: 'commonJS' | 'haste'
      // default: 'commonJS'
      type: 'commonJS',
      // The absolute path to the root directory of your project
      rootDir: __dirname,
    },
  })],
};

export default config;
@oudmane oudmane added the enhancement New feature or request label Nov 22, 2024
@nmn
Copy link
Contributor

nmn commented Nov 24, 2024

This feature is not currently supported.

I can also implement it and make PR

Yes please!

@yousoumar
Copy link
Contributor

yousoumar commented Nov 29, 2024

Hi @nmn! Can I work on this since there is no response since? If so, please assign it to me.

@nmn
Copy link
Contributor

nmn commented Nov 30, 2024

@yousoumar There's many other issues that are up for grabs if you're looking for something. It's been less than a week so I would like to give @oudmane more time.

@nonzzz nonzzz linked a pull request Dec 18, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants