@unocss/webpack 0.44.2 → 0.44.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,6 +23,13 @@ module.exports = {
23
23
  }
24
24
  ```
25
25
 
26
+ Add `uno.css` to your main entry:
27
+
28
+ ```ts
29
+ // main.ts
30
+ import 'uno.css'
31
+ ```
32
+
26
33
  Or you can have the config file in `unocss.config.js` or `unocss.config.ts`.
27
34
 
28
35
  ## License
package/dist/index.cjs CHANGED
@@ -22,7 +22,7 @@ const IGNORE_COMMENT = "@unocss-ignore";
22
22
  const CSS_PLACEHOLDER = "@unocss-placeholder";
23
23
 
24
24
  const defaultExclude = [core.cssIdRE];
25
- const defaultInclude = [/\.vue$/, /\.vue\?vue/, /\.svelte$/, /\.[jt]sx$/, /\.mdx?$/, /\.astro$/, /\.elm$/];
25
+ const defaultInclude = [/\.vue$/, /\.vue\?vue/, /\.svelte$/, /\.[jt]sx$/, /\.mdx?$/, /\.astro$/, /\.elm$/, /\.html$/];
26
26
 
27
27
  function createContext(configOrPath, defaults = {}, extraConfigSources = [], resolveConfigResult = () => {
28
28
  }) {
@@ -204,7 +204,7 @@ function WebpackPlugin(configOrPath, defaults) {
204
204
  name: "unocss:webpack",
205
205
  enforce: "pre",
206
206
  transformInclude(id) {
207
- return filter("", id);
207
+ return filter("", id) && !id.match(/\.html$/);
208
208
  },
209
209
  async transform(code, id) {
210
210
  const result = await applyTransformers(ctx, code, id, "pre");
package/dist/index.mjs CHANGED
@@ -12,7 +12,7 @@ const IGNORE_COMMENT = "@unocss-ignore";
12
12
  const CSS_PLACEHOLDER = "@unocss-placeholder";
13
13
 
14
14
  const defaultExclude = [cssIdRE];
15
- const defaultInclude = [/\.vue$/, /\.vue\?vue/, /\.svelte$/, /\.[jt]sx$/, /\.mdx?$/, /\.astro$/, /\.elm$/];
15
+ const defaultInclude = [/\.vue$/, /\.vue\?vue/, /\.svelte$/, /\.[jt]sx$/, /\.mdx?$/, /\.astro$/, /\.elm$/, /\.html$/];
16
16
 
17
17
  function createContext(configOrPath, defaults = {}, extraConfigSources = [], resolveConfigResult = () => {
18
18
  }) {
@@ -194,7 +194,7 @@ function WebpackPlugin(configOrPath, defaults) {
194
194
  name: "unocss:webpack",
195
195
  enforce: "pre",
196
196
  transformInclude(id) {
197
- return filter("", id);
197
+ return filter("", id) && !id.match(/\.html$/);
198
198
  },
199
199
  async transform(code, id) {
200
200
  const result = await applyTransformers(ctx, code, id, "pre");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/webpack",
3
- "version": "0.44.2",
3
+ "version": "0.44.5",
4
4
  "description": "The Webpack plugin for UnoCSS",
5
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -38,8 +38,8 @@
38
38
  "dependencies": {
39
39
  "@ampproject/remapping": "^2.2.0",
40
40
  "@rollup/pluginutils": "^4.2.1",
41
- "@unocss/config": "0.44.2",
42
- "@unocss/core": "0.44.2",
41
+ "@unocss/config": "0.44.5",
42
+ "@unocss/core": "0.44.5",
43
43
  "magic-string": "^0.26.2",
44
44
  "unplugin": "^0.7.0",
45
45
  "webpack-sources": "^3.2.3"