Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

CSS Modules in single file components don't work if extract CSS option is enabled #442

Closed
alekbarszczewski opened this issue May 23, 2018 · 1 comment
Labels

Comments

@alekbarszczewski
Copy link

alekbarszczewski commented May 23, 2018

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

It seems that CSS modules in single file components (vue) don't work if extract CSS options is enabled

If the current behavior is a bug, please provide the steps to reproduce.

<template>
  <div :class="$style.logoImage"></div>
</template>

<script>
  export default {}
</script>

<style module lang="scss">
  .logoImage {
    height: 50px;
  }
</style>

poi.config.js:

module.exports = (options, req) => ({
  entry: './src/app.js',
  css: {
    extract: true
  }
})

It throws following error:

[Vue warn]: Error in render: "TypeError: Cannot read property 'logoImage' of undefined"

If I change extract CSS option to false then it works

What is the expected behavior?

It should support CSS modules when extract CSS option is enabled

Please mention other relevant information such as the browser version, Node.js version, Poi version and Operating System.

"node-sass": "^4.9.0",
"poi": "^10.1.9",
"sass-loader": "^7.0.1"
"vue": "^2.5.16"

Node.js: v8.10.0
Mac OS X
@github-actions
Copy link

github-actions bot commented May 1, 2020

This issue has been marked as Stale, it will be closed in a week if there's no furthur activity.

@github-actions github-actions bot added the stale label May 1, 2020
@github-actions github-actions bot closed this as completed May 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant