Skip to content

Commit

Permalink
fix issue with cjs and esm
Browse files Browse the repository at this point in the history
  • Loading branch information
Applelo committed Nov 26, 2023
1 parent 0150cf8 commit 8071d74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions playground/vitejs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"private": true,
"type": "module",

Check failure on line 3 in playground/vitejs/package.json

View workflow job for this annotation

GitHub Actions / Lint: node-16, ubuntu-latest

Expected object keys to be in specified order. 'type' should be before 'private'
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
Expand Down
4 changes: 3 additions & 1 deletion src/adapter/HtmlRspackPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import type { Compiler } from '@rspack/core/dist/Compiler'
import { RawSource } from 'webpack-sources'
import pkgWebpackSources from 'webpack-sources'
import type { HtmlTagDescriptor } from 'vite'
import type { Options } from '../types'
import { getAssetsForWebpackOrRspack } from '../helper/getAssets'
import { getTagsAttributes } from '../helper/getTagsAttributes'
import { injectToCustom, injectToHead } from '../helper/html'

const { RawSource } = pkgWebpackSources

export function htmlRspackPluginAdapter(args: {
name: string
compiler: Compiler
Expand Down

0 comments on commit 8071d74

Please sign in to comment.