Skip to content

Commit

Permalink
Merge pull request #8 from baozouai/support-importAssertions
Browse files Browse the repository at this point in the history
feat: support importAssertions
  • Loading branch information
baozouai committed Apr 23, 2024
2 parents 299f7bb + 1f3c246 commit 9e6eba6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions playgrounds/vue/src/main.ts
@@ -1,7 +1,9 @@
import { createApp } from 'vue'
import packageJson from '../package.json' assert { type: 'json' }
import App from './App.vue'
import './index.css'

console.log(packageJson)
const app = createApp(App)

app.mount('#app')
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Expand Up @@ -139,6 +139,7 @@ export default function enhanceLogPlugin(options: Options = {}): PluginOption {
const ast = parse(code, {
sourceType: 'unambiguous',
sourceFilename: id,
plugins: ['importAssertions'],
})
const consumer = await new SourceMapConsumer(rawSourcemap as RawSourceMap)

Expand Down

0 comments on commit 9e6eba6

Please sign in to comment.