Skip to content

Commit

Permalink
reverting module.ts back to origina, removing type declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin Stewart committed Aug 31, 2023
1 parent 5f1aeb9 commit 144dbb7
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,13 @@ export default defineNuxtModule<Partial<Options>>({

nuxt.hook('vite:extendConfig', (config, { isClient }) => {
const mode = isClient ? 'client' : 'server'
const sourcemapValue = nuxt.options.sourcemap[mode]
if (typeof sourcemapValue !== 'boolean') {
throw new TypeError(`Expected a boolean for sourcemap[${mode}], but received ${typeof sourcemapValue}.`)
}

config.plugins = config.plugins || []
config.plugins.push(
transformPlugin.vite({
include: options.include,
exclude: options.exclude,
sourcemap: sourcemapValue,
sourcemap: nuxt.options.sourcemap[mode],

Check failure on line 35 in src/module.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest, 16)

Type 'string | boolean' is not assignable to type 'boolean'.

Check failure on line 35 in src/module.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest, 18)

Type 'string | boolean' is not assignable to type 'boolean'.

Check failure on line 35 in src/module.ts

View workflow job for this annotation

GitHub Actions / test (windows-latest, 16)

Type 'string | boolean' is not assignable to type 'boolean'.

Check failure on line 35 in src/module.ts

View workflow job for this annotation

GitHub Actions / test (windows-latest, 18)

Type 'string | boolean' is not assignable to type 'boolean'.
transformStyles: name => resolveStyles(options, name)
})
)
Expand All @@ -45,17 +41,13 @@ export default defineNuxtModule<Partial<Options>>({
nuxt.hook('webpack:config', (configs) => {
configs.forEach((config) => {
const mode = config.name === 'client' ? 'client' : 'server'
const sourcemapValue = nuxt.options.sourcemap[mode]
if (typeof sourcemapValue !== 'boolean') {
throw new TypeError(`Expected a boolean for sourcemap[${mode}], but received ${typeof sourcemapValue}.`)
}

config.plugins = config.plugins || []
config.plugins.push(
transformPlugin.webpack({
include: options.include,
exclude: options.exclude,
sourcemap: sourcemapValue,
sourcemap: nuxt.options.sourcemap[mode],

Check failure on line 50 in src/module.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest, 16)

Type 'string | boolean' is not assignable to type 'boolean'.

Check failure on line 50 in src/module.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest, 18)

Type 'string | boolean' is not assignable to type 'boolean'.

Check failure on line 50 in src/module.ts

View workflow job for this annotation

GitHub Actions / test (windows-latest, 16)

Type 'string | boolean' is not assignable to type 'boolean'.

Check failure on line 50 in src/module.ts

View workflow job for this annotation

GitHub Actions / test (windows-latest, 18)

Type 'string | boolean' is not assignable to type 'boolean'.
transformStyles: name => resolveStyles(options, name)
})
)
Expand Down

0 comments on commit 144dbb7

Please sign in to comment.