Skip to content

tsx: css module not working in production build #6069

@Innei

Description

@Innei

Version

4.5.9

Reproduction link

[https://github.com/mx-space/notebook/tree/29f705b18f380f072e588bdfa7238d1037a2cbaf)

Environment info

[System Information]
OS Version     : macOS Big Sur
NodeJS Version : v14.15.0
YARN Version    : 1.22.10 

Vue: 3.0.0
ts: 4.0.5

Steps to reproduce

  1. use css module in .tsx file. In development mode, tt working, not working in production build. and every class which is css module lost.

image

and this is my vue conifg:

module.exports = {
  publicPath:
    process.env.NODE_ENV === 'production'
      ? !process.env.VUE_APP_PUBLIC_URL
        ? 'https://cdn.jsdelivr.net/gh/mx-space/notebook@gh-pages'
        : ''
      : '/',
}

What is expected?

css module working in production

What is actually happening?

css module not working in production

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions