madskristensen / BundlerMinifier

Visual Studio extension
Other
611 stars 171 forks source link

Support for css modules #578

Open baracuda69 opened 2 years ago

baracuda69 commented 2 years ago

Installed product versions

Description

Please support minification of JS to include css modules. For example: import sheet from './styles.css' assert { type: 'css' };

Steps to recreate

Add the following to JS-file:

import sheet from './styles.css' assert { type: 'css' };

Current behavior

Visual Studio editor highlights the word assert with squiggly green line; Hover over that to get error code: TS1005 (JS): ';' expected.

Error List shows the following error (Bundler & Minifier) Expected ';'

JS file is NOT minified (as a result of the above supposed syntax error).

Expected behavior

  1. The editor should not highlight "assert" (it should not see it as a syntax error).
  2. More importantly, the minifier should minify the JS-file.