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

Composes #320

Closed
alexey13 opened this issue Sep 7, 2020 · 1 comment
Closed

Composes #320

alexey13 opened this issue Sep 7, 2020 · 1 comment

Comments

@alexey13
Copy link

alexey13 commented Sep 7, 2020

Good day!
Looks like I get a problem with path when composes used.
Someone had that problem?

Rollup config

import commonjs from '@rollup/plugin-commonjs';
import resolve  from '@rollup/plugin-node-resolve';
import postcss from 'rollup-plugin-postcss';
import replace from '@rollup/plugin-replace';

const options = {
  input: './src/index.js',
  plugins: [
    replace({
      'process.env.NODE_ENV': JSON.stringify('development')
    }),
    resolve(),
    commonjs(),
    postcss({
      extract: true,
      modules: false,
      autoModules: true
    }),
  ],
  output: {
    file: './dist/index.js',
    format: 'iife',
  }
};

export default options;

Css

.number {
  composes: input from './input.module.css';
}

When on build Error: ENOENT: no such file or directory, open 'C:\C:...

@alexey13
Copy link
Author

alexey13 commented Sep 9, 2020

I noticed that in path error c://c://....
Repeated twice the disk letter.
So i added to config (root: '') and it resolved the issue

postcss({
      extract: true,
      modules: {
        root: ''
      },
      autoModules: true
    }),

@alexey13 alexey13 closed this as completed Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant