feat(rspack,webpack): add rspack builder (#29142)

Co-authored-by: "yangjian.fe" <yangjian.fe@bytedance.com>
Co-authored-by: underfin <likui6666666@gmail.com>
This commit is contained in:
Daniel Roe 2024-10-09 15:57:54 +02:00 committed by GitHub
parent 56d2261471
commit 01bee2f0ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
40 changed files with 649 additions and 152 deletions

View File

@ -191,7 +191,7 @@ jobs:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest]
env: ["dev", "built"] env: ["dev", "built"]
builder: ["vite", "webpack"] builder: ["vite", "rspack", "webpack"]
context: ["async", "default"] context: ["async", "default"]
manifest: ["manifest-on", "manifest-off"] manifest: ["manifest-on", "manifest-off"]
payload: ["json", "js"] payload: ["json", "js"]
@ -199,12 +199,18 @@ jobs:
exclude: exclude:
- builder: "webpack" - builder: "webpack"
payload: "js" payload: "js"
- builder: "rspack"
payload: "js"
- manifest: "manifest-off" - manifest: "manifest-off"
payload: "js" payload: "js"
- context: "default" - context: "default"
payload: "js" payload: "js"
- os: windows-latest - os: windows-latest
payload: "js" payload: "js"
- env: "dev"
builder: "rspack"
- manifest: "manifest-off"
builder: "rspack"
- env: "dev" - env: "dev"
builder: "webpack" builder: "webpack"
- manifest: "manifest-off" - manifest: "manifest-off"

View File

@ -35,6 +35,7 @@
}, },
"resolutions": { "resolutions": {
"@nuxt/kit": "workspace:*", "@nuxt/kit": "workspace:*",
"@nuxt/rspack-builder": "workspace:*",
"@nuxt/schema": "workspace:*", "@nuxt/schema": "workspace:*",
"@nuxt/ui-templates": "workspace:*", "@nuxt/ui-templates": "workspace:*",
"@nuxt/vite-builder": "workspace:*", "@nuxt/vite-builder": "workspace:*",
@ -63,6 +64,7 @@
"@eslint/js": "9.12.0", "@eslint/js": "9.12.0",
"@nuxt/eslint-config": "0.5.7", "@nuxt/eslint-config": "0.5.7",
"@nuxt/kit": "workspace:*", "@nuxt/kit": "workspace:*",
"@nuxt/rspack-builder": "workspace:*",
"@nuxt/test-utils": "3.14.3", "@nuxt/test-utils": "3.14.3",
"@nuxt/webpack-builder": "workspace:*", "@nuxt/webpack-builder": "workspace:*",
"@testing-library/vue": "8.1.0", "@testing-library/vue": "8.1.0",

View File

@ -6,6 +6,7 @@ export default defineBuildConfig({
'src/index', 'src/index',
], ],
externals: [ externals: [
'@rspack/core',
'@nuxt/schema', '@nuxt/schema',
'nitropack', 'nitropack',
'nitro', 'nitro',

View File

@ -48,6 +48,7 @@
"untyped": "^1.5.1" "untyped": "^1.5.1"
}, },
"devDependencies": { "devDependencies": {
"@rspack/core": "1.0.8",
"@types/hash-sum": "1.0.2", "@types/hash-sum": "1.0.2",
"@types/semver": "7.5.8", "@types/semver": "7.5.8",
"nitro": "npm:nitro-nightly@3.0.0-beta-28665895.e727afda", "nitro": "npm:nitro-nightly@3.0.0-beta-28665895.e727afda",

View File

@ -1,4 +1,5 @@
import type { Configuration as WebpackConfig, WebpackPluginInstance } from 'webpack' import type { Configuration as WebpackConfig, WebpackPluginInstance } from 'webpack'
import type { RspackPluginInstance } from '@rspack/core'
import type { UserConfig as ViteConfig, Plugin as VitePlugin } from 'vite' import type { UserConfig as ViteConfig, Plugin as VitePlugin } from 'vite'
import { useNuxt } from './context' import { useNuxt } from './context'
import { toArray } from './utils' import { toArray } from './utils'
@ -36,16 +37,7 @@ export interface ExtendWebpackConfigOptions extends ExtendConfigOptions {}
// eslint-disable-next-line @typescript-eslint/no-empty-object-type // eslint-disable-next-line @typescript-eslint/no-empty-object-type
export interface ExtendViteConfigOptions extends ExtendConfigOptions {} export interface ExtendViteConfigOptions extends ExtendConfigOptions {}
/** const extendWebpackCompatibleConfig = (builder: 'rspack' | 'webpack') => (fn: ((config: WebpackConfig) => void), options: ExtendWebpackConfigOptions = {}) => {
* Extend webpack config
*
* The fallback function might be called multiple times
* when applying to both client and server builds.
*/
export function extendWebpackConfig (
fn: ((config: WebpackConfig) => void),
options: ExtendWebpackConfigOptions = {},
) {
const nuxt = useNuxt() const nuxt = useNuxt()
if (options.dev === false && nuxt.options.dev) { if (options.dev === false && nuxt.options.dev) {
@ -55,7 +47,7 @@ export function extendWebpackConfig (
return return
} }
nuxt.hook('webpack:config', (configs: WebpackConfig[]) => { nuxt.hook(`${builder}:config`, (configs) => {
if (options.server !== false) { if (options.server !== false) {
const config = configs.find(i => i.name === 'server') const config = configs.find(i => i.name === 'server')
if (config) { if (config) {
@ -71,13 +63,25 @@ export function extendWebpackConfig (
}) })
} }
/**
* Extend webpack config
*
* The fallback function might be called multiple times
* when applying to both client and server builds.
*/
export const extendWebpackConfig = extendWebpackCompatibleConfig('webpack')
/**
* Extend rspack config
*
* The fallback function might be called multiple times
* when applying to both client and server builds.
*/
export const extendRspackConfig = extendWebpackCompatibleConfig('rspack')
/** /**
* Extend Vite config * Extend Vite config
*/ */
export function extendViteConfig ( export function extendViteConfig (fn: ((config: ViteConfig) => void), options: ExtendViteConfigOptions = {}) {
fn: ((config: ViteConfig) => void),
options: ExtendViteConfigOptions = {},
) {
const nuxt = useNuxt() const nuxt = useNuxt()
if (options.dev === false && nuxt.options.dev) { if (options.dev === false && nuxt.options.dev) {
@ -114,6 +118,18 @@ export function addWebpackPlugin (pluginOrGetter: WebpackPluginInstance | Webpac
config.plugins[method](...toArray(plugin)) config.plugins[method](...toArray(plugin))
}, options) }, options)
} }
/**
* Append rspack plugin to the config.
*/
export function addRspackPlugin (pluginOrGetter: RspackPluginInstance | RspackPluginInstance[] | (() => RspackPluginInstance | RspackPluginInstance[]), options?: ExtendWebpackConfigOptions) {
extendRspackConfig((config) => {
const method: 'push' | 'unshift' = options?.prepend ? 'unshift' : 'push'
const plugin = typeof pluginOrGetter === 'function' ? pluginOrGetter() : pluginOrGetter
config.plugins = config.plugins || []
config.plugins[method](...toArray(plugin))
}, options)
}
/** /**
* Append Vite plugin to the config. * Append Vite plugin to the config.
@ -131,6 +147,7 @@ export function addVitePlugin (pluginOrGetter: VitePlugin | VitePlugin[] | (() =
interface AddBuildPluginFactory { interface AddBuildPluginFactory {
vite?: () => VitePlugin | VitePlugin[] vite?: () => VitePlugin | VitePlugin[]
webpack?: () => WebpackPluginInstance | WebpackPluginInstance[] webpack?: () => WebpackPluginInstance | WebpackPluginInstance[]
rspack?: () => RspackPluginInstance | RspackPluginInstance[]
} }
export function addBuildPlugin (pluginFactory: AddBuildPluginFactory, options?: ExtendConfigOptions) { export function addBuildPlugin (pluginFactory: AddBuildPluginFactory, options?: ExtendConfigOptions) {
@ -141,4 +158,8 @@ export function addBuildPlugin (pluginFactory: AddBuildPluginFactory, options?:
if (pluginFactory.webpack) { if (pluginFactory.webpack) {
addWebpackPlugin(pluginFactory.webpack, options) addWebpackPlugin(pluginFactory.webpack, options)
} }
if (pluginFactory.rspack) {
addRspackPlugin(pluginFactory.rspack, options)
}
} }

View File

@ -8,6 +8,7 @@ export function normalizeSemanticVersion (version: string) {
} }
const builderMap = { const builderMap = {
'@nuxt/rspack-builder': 'rspack',
'@nuxt/vite-builder': 'vite', '@nuxt/vite-builder': 'vite',
'@nuxt/webpack-builder': 'webpack', '@nuxt/webpack-builder': 'webpack',
} }

View File

@ -13,7 +13,7 @@ export type { LoadNuxtOptions } from './loader/nuxt'
// Utils // Utils
export { addImports, addImportsDir, addImportsSources } from './imports' export { addImports, addImportsDir, addImportsSources } from './imports'
export { updateRuntimeConfig, useRuntimeConfig } from './runtime-config' export { updateRuntimeConfig, useRuntimeConfig } from './runtime-config'
export { addBuildPlugin, addVitePlugin, addWebpackPlugin, extendViteConfig, extendWebpackConfig } from './build' export { addBuildPlugin, addVitePlugin, addRspackPlugin, addWebpackPlugin, extendViteConfig, extendRspackConfig, extendWebpackConfig } from './build'
export type { ExtendConfigOptions, ExtendViteConfigOptions, ExtendWebpackConfigOptions } from './build' export type { ExtendConfigOptions, ExtendViteConfigOptions, ExtendWebpackConfigOptions } from './build'
export { assertNuxtCompatibility, checkNuxtCompatibility, getNuxtVersion, hasNuxtCompatibility, isNuxtMajorVersion, normalizeSemanticVersion, isNuxt2, isNuxt3 } from './compatibility' export { assertNuxtCompatibility, checkNuxtCompatibility, getNuxtVersion, hasNuxtCompatibility, isNuxtMajorVersion, normalizeSemanticVersion, isNuxt2, isNuxt3 } from './compatibility'
export { addComponent, addComponentsDir } from './components' export { addComponent, addComponentsDir } from './components'

View File

@ -274,16 +274,18 @@ export default defineNuxtModule<ComponentsOptions>({
} }
}) })
nuxt.hook('webpack:config', (configs) => { for (const key of ['rspack:config', 'webpack:config'] as const) {
configs.forEach((config) => { nuxt.hook(key, (configs) => {
const mode = config.name === 'client' ? 'client' : 'server' configs.forEach((config) => {
config.plugins = config.plugins || [] const mode = config.name === 'client' ? 'client' : 'server'
config.plugins = config.plugins || []
if (mode !== 'server') { if (mode !== 'server') {
writeFileSync(join(nuxt.options.buildDir, 'components-chunk.mjs'), 'export const paths = {}') writeFileSync(join(nuxt.options.buildDir, 'components-chunk.mjs'), 'export const paths = {}')
} }
})
}) })
}) }
} }
}, },
}) })

View File

@ -347,7 +347,7 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) {
} }
} }
if (nuxt.options.builder === '@nuxt/webpack-builder' || nuxt.options.dev) { if (nuxt.options.dev || nuxt.options.builder === '@nuxt/webpack-builder' || nuxt.options.builder === '@nuxt/rspack-builder') {
nitroConfig.virtual!['#build/dist/server/styles.mjs'] = 'export default {}' nitroConfig.virtual!['#build/dist/server/styles.mjs'] = 'export default {}'
// In case a non-normalized absolute path is called for on Windows // In case a non-normalized absolute path is called for on Windows
if (process.platform === 'win32') { if (process.platform === 'win32') {
@ -448,18 +448,20 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) {
} }
} }
}) })
nuxt.hook('webpack:config', (configuration) => { for (const hook of ['webpack:config', 'rspack:config'] as const) {
const clientConfig = configuration.find(config => config.name === 'client') nuxt.hook(hook, (configuration) => {
if (!clientConfig!.resolve) { clientConfig!.resolve!.alias = {} } const clientConfig = configuration.find(config => config.name === 'client')
if (Array.isArray(clientConfig!.resolve!.alias)) { if (!clientConfig!.resolve) { clientConfig!.resolve!.alias = {} }
clientConfig!.resolve!.alias.push({ if (Array.isArray(clientConfig!.resolve!.alias)) {
name: 'vue', clientConfig!.resolve!.alias.push({
alias: 'vue/dist/vue.esm-bundler', name: 'vue',
}) alias: 'vue/dist/vue.esm-bundler',
} else { })
clientConfig!.resolve!.alias!.vue = 'vue/dist/vue.esm-bundler' } else {
} clientConfig!.resolve!.alias!.vue = 'vue/dist/vue.esm-bundler'
}) }
})
}
} }
// Setup handlers // Setup handlers
@ -545,13 +547,15 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) {
// nuxt dev // nuxt dev
if (nuxt.options.dev) { if (nuxt.options.dev) {
nuxt.hook('webpack:compile', ({ name, compiler }) => { for (const builder of ['webpack', 'rspack'] as const) {
if (name === 'server') { nuxt.hook(`${builder}:compile`, ({ name, compiler }) => {
const memfs = compiler.outputFileSystem as typeof import('node:fs') if (name === 'server') {
nitro.options.virtual['#build/dist/server/server.mjs'] = () => memfs.readFileSync(join(nuxt.options.buildDir, 'dist/server/server.mjs'), 'utf-8') const memfs = compiler.outputFileSystem as typeof import('node:fs')
} nitro.options.virtual['#build/dist/server/server.mjs'] = () => memfs.readFileSync(join(nuxt.options.buildDir, 'dist/server/server.mjs'), 'utf-8')
}) }
nuxt.hook('webpack:compiled', () => { nuxt.server.reload() }) })
nuxt.hook(`${builder}:compiled`, () => { nuxt.server.reload() })
}
nuxt.hook('vite:compiled', () => { nuxt.server.reload() }) nuxt.hook('vite:compiled', () => { nuxt.server.reload() })
nuxt.hook('server:devHandler', (h) => { devMiddlewareHandler.set(h) }) nuxt.hook('server:devHandler', (h) => { devMiddlewareHandler.set(h) })

View File

@ -497,9 +497,11 @@ async function initNuxt (nuxt: Nuxt) {
const envMap = { const envMap = {
// defaults from `builder` based on package name // defaults from `builder` based on package name
'@nuxt/rspack-builder': '@rspack/core/module',
'@nuxt/vite-builder': 'vite/client', '@nuxt/vite-builder': 'vite/client',
'@nuxt/webpack-builder': 'webpack/module', '@nuxt/webpack-builder': 'webpack/module',
// simpler overrides from `typescript.builder` for better DX // simpler overrides from `typescript.builder` for better DX
'rspack': '@rspack/core/module',
'vite': 'vite/client', 'vite': 'vite/client',
'webpack': 'webpack/module', 'webpack': 'webpack/module',
// default 'merged' builder environment for module authors // default 'merged' builder environment for module authors

View File

@ -0,0 +1,18 @@
import { defineBuildConfig } from 'unbuild'
import config from '../webpack/build.config'
export default defineBuildConfig({
...config[0],
externals: [
'@rspack/core',
'#builder',
'@nuxt/schema',
],
entries: [
{
input: '../webpack/src/index',
name: 'index',
declaration: true,
},
],
})

View File

@ -0,0 +1,5 @@
import webpack from '@rspack/core'
export const builder = 'rspack'
export { webpack }
export const MiniCssExtractPlugin = webpack.CssExtractRspackPlugin

View File

@ -0,0 +1,94 @@
{
"name": "@nuxt/rspack-builder",
"version": "3.12.2",
"repository": {
"type": "git",
"url": "git+https://github.com/nuxt/nuxt.git",
"directory": "packages/rspack"
},
"description": "rspack bundler for Nuxt",
"homepage": "https://nuxt.com",
"license": "MIT",
"type": "module",
"types": "./dist/index.d.ts",
"imports": {
"#builder": "./builder.mjs"
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs"
},
"./dist/*": "./dist/*"
},
"files": [
"dist",
"builder.mjs"
],
"scripts": {
"prepack": "unbuild"
},
"dependencies": {
"@nuxt/friendly-errors-webpack-plugin": "^2.6.0",
"@nuxt/kit": "workspace:*",
"@rspack/core": "^1.0.8",
"autoprefixer": "^10.4.20",
"css-loader": "^7.1.2",
"css-minimizer-webpack-plugin": "^7.0.0",
"cssnano": "^7.0.6",
"defu": "^6.1.4",
"esbuild-loader": "^4.2.2",
"escape-string-regexp": "^5.0.0",
"estree-walker": "^3.0.3",
"file-loader": "^6.2.0",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"globby": "^14.0.2",
"h3": "npm:h3-nightly@2.0.0-1718872656.6765a6e",
"hash-sum": "^2.0.0",
"jiti": "^2.3.3",
"knitwork": "^1.1.0",
"lodash-es": "4.17.21",
"magic-string": "^0.30.11",
"memfs": "^4.13.0",
"mlly": "^1.7.2",
"ohash": "^1.1.4",
"pathe": "^1.1.2",
"pify": "^6.1.0",
"postcss": "^8.4.47",
"postcss-import": "^16.1.0",
"postcss-import-resolver": "^2.0.0",
"postcss-loader": "^8.1.1",
"postcss-url": "^10.1.3",
"pug-plain-loader": "^1.1.0",
"std-env": "^3.7.0",
"time-fix-plugin": "^2.0.7",
"ufo": "^1.5.4",
"unenv": "^1.10.0",
"unplugin": "^1.14.1",
"url-loader": "^4.1.1",
"vue-bundle-renderer": "^2.1.1",
"vue-loader": "^17.4.2",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-dev-middleware": "^7.4.2",
"webpack-hot-middleware": "^2.26.1",
"webpack-virtual-modules": "^0.6.2",
"webpackbar": "^6.0.1"
},
"devDependencies": {
"@nuxt/schema": "workspace:*",
"@types/hash-sum": "1.0.2",
"@types/lodash-es": "4.17.12",
"@types/pify": "5.0.4",
"@types/webpack-bundle-analyzer": "4.7.0",
"@types/webpack-hot-middleware": "2.25.9",
"rollup": "4.24.0",
"unbuild": "3.0.0-rc.11",
"vue": "3.5.11"
},
"peerDependencies": {
"vue": "^3.3.4"
},
"engines": {
"node": "^14.18.0 || >=16.10.0"
}
}

View File

@ -7,14 +7,15 @@ import { consola } from 'consola'
export default defineUntypedSchema({ export default defineUntypedSchema({
/** /**
* The builder to use for bundling the Vue part of your application. * The builder to use for bundling the Vue part of your application.
* @type {'vite' | 'webpack' | { bundle: (nuxt: typeof import('../src/types/nuxt').Nuxt) => Promise<void> }} * @type {'vite' | 'webpack' | 'rspack' | { bundle: (nuxt: typeof import('../src/types/nuxt').Nuxt) => Promise<void> }}
*/ */
builder: { builder: {
$resolve: async (val: 'vite' | 'webpack' | { bundle: (nuxt: unknown) => Promise<void> } | undefined = 'vite', get) => { $resolve: async (val: 'vite' | 'webpack' | 'rspack' | { bundle: (nuxt: unknown) => Promise<void> } | undefined = 'vite', get) => {
if (typeof val === 'object') { if (typeof val === 'object') {
return val return val
} }
const map: Record<string, string> = { const map: Record<string, string> = {
rspack: '@nuxt/rspack-builder',
vite: '@nuxt/vite-builder', vite: '@nuxt/vite-builder',
webpack: '@nuxt/webpack-builder', webpack: '@nuxt/webpack-builder',
} }

View File

@ -20,7 +20,7 @@ export default defineUntypedSchema({
* builder environment types (with `false`) to handle this fully yourself, or opt for a 'shared' option. * builder environment types (with `false`) to handle this fully yourself, or opt for a 'shared' option.
* *
* The 'shared' option is advised for module authors, who will want to support multiple possible builders. * The 'shared' option is advised for module authors, who will want to support multiple possible builders.
* @type {'vite' | 'webpack' | 'shared' | false | undefined} * @type {'vite' | 'webpack' | 'rspack' | 'shared' | false | undefined}
*/ */
builder: { builder: {
$resolve: val => val ?? null, $resolve: val => val ?? null,

View File

@ -26,7 +26,7 @@ export interface NuxtCompatibility {
* }) * })
* ``` * ```
*/ */
builder?: Partial<Record<'vite' | 'webpack' | (string & {}), false | string>> builder?: Partial<Record<'vite' | 'webpack' | 'rspack' | (string & {}), false | string>>
} }
export interface NuxtCompatibilityIssue { export interface NuxtCompatibilityIssue {

View File

@ -81,7 +81,7 @@ export interface NuxtBuilder {
export interface NuxtOptions extends Omit<ConfigSchema, 'vue' | 'sourcemap' | 'builder' | 'postcss' | 'webpack'> { export interface NuxtOptions extends Omit<ConfigSchema, 'vue' | 'sourcemap' | 'builder' | 'postcss' | 'webpack'> {
vue: Omit<ConfigSchema['vue'], 'config'> & { config?: Partial<Filter<VueAppConfig, string | boolean>> } vue: Omit<ConfigSchema['vue'], 'config'> & { config?: Partial<Filter<VueAppConfig, string | boolean>> }
sourcemap: Required<Exclude<ConfigSchema['sourcemap'], boolean>> sourcemap: Required<Exclude<ConfigSchema['sourcemap'], boolean>>
builder: '@nuxt/vite-builder' | '@nuxt/webpack-builder' | NuxtBuilder builder: '@nuxt/vite-builder' | '@nuxt/webpack-builder' | '@nuxt/rspack-builder' | NuxtBuilder
postcss: Omit<ConfigSchema['postcss'], 'order'> & { order: Exclude<ConfigSchema['postcss']['order'], string> } postcss: Omit<ConfigSchema['postcss'], 'order'> & { order: Exclude<ConfigSchema['postcss']['order'], string> }
webpack: ConfigSchema['webpack'] & { webpack: ConfigSchema['webpack'] & {
$client: ConfigSchema['webpack'] $client: ConfigSchema['webpack']

View File

@ -408,6 +408,55 @@ export interface NuxtHooks {
* @returns void * @returns void
*/ */
'webpack:progress': (statesArray: any[]) => void 'webpack:progress': (statesArray: any[]) => void
// rspack
/**
* Called before configuring the webpack compiler.
* @param webpackConfigs Configs objects to be pushed to the compiler
* @returns Promise
*/
'rspack:config': (webpackConfigs: Configuration[]) => HookResult
/**
* Allows to read the resolved webpack config
* @param webpackConfigs Configs objects to be pushed to the compiler
* @returns Promise
*/
'rspack:configResolved': (webpackConfigs: Readonly<Configuration>[]) => HookResult
/**
* Called right before compilation.
* @param options The options to be added
* @returns Promise
*/
'rspack:compile': (options: { name: string, compiler: Compiler }) => HookResult
/**
* Called after resources are loaded.
* @param options The compiler options
* @returns Promise
*/
'rspack:compiled': (options: { name: string, compiler: Compiler, stats: Stats }) => HookResult
/**
* Called on `change` on WebpackBar.
* @param shortPath the short path
* @returns void
*/
'rspack:change': (shortPath: string) => void
/**
* Called on `done` if has errors on WebpackBar.
* @returns void
*/
'rspack:error': () => void
/**
* Called on `allDone` on WebpackBar.
* @returns void
*/
'rspack:done': () => void
/**
* Called on `progress` on WebpackBar.
* @param statesArray The array containing the states on progress
* @returns void
*/
'rspack:progress': (statesArray: any[]) => void
} }
export type NuxtHookName = keyof NuxtHooks export type NuxtHookName = keyof NuxtHooks

View File

@ -17,6 +17,7 @@ export default defineBuildConfig({
'vue', 'vue',
], ],
externals: [ externals: [
'#builder',
'@nuxt/schema', '@nuxt/schema',
], ],
}) })

8
packages/webpack/builder.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
declare module '#builder' {
import type Webpack from 'webpack'
import type MiniCssExtractPlugin from 'mini-css-extract-plugin'
export const webpack: typeof Webpack
export const MiniCssExtractPlugin: typeof MiniCssExtractPlugin
export const builder: 'webpack' | 'rspack'
}

View File

@ -0,0 +1,3 @@
export const builder = 'webpack'
export { default as webpack } from 'webpack'
export { default as MiniCssExtractPlugin } from 'mini-css-extract-plugin'

View File

@ -11,6 +11,9 @@
"license": "MIT", "license": "MIT",
"type": "module", "type": "module",
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",
"imports": {
"#builder": "./builder.mjs"
},
"exports": { "exports": {
".": { ".": {
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",
@ -19,7 +22,8 @@
"./dist/*": "./dist/*" "./dist/*": "./dist/*"
}, },
"files": [ "files": [
"dist" "dist",
"builder.mjs"
], ],
"scripts": { "scripts": {
"prepack": "unbuild" "prepack": "unbuild"
@ -72,6 +76,7 @@
}, },
"devDependencies": { "devDependencies": {
"@nuxt/schema": "workspace:*", "@nuxt/schema": "workspace:*",
"@rspack/core": "1.0.8",
"@types/hash-sum": "1.0.2", "@types/hash-sum": "1.0.2",
"@types/lodash-es": "4.17.12", "@types/lodash-es": "4.17.12",
"@types/pify": "5.0.4", "@types/pify": "5.0.4",

View File

@ -1,6 +1,5 @@
import querystring from 'node:querystring' import querystring from 'node:querystring'
import { resolve } from 'pathe' import { resolve } from 'pathe'
import webpack from 'webpack'
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer' import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'
import { logger } from '@nuxt/kit' import { logger } from '@nuxt/kit'
import { joinURL } from 'ufo' import { joinURL } from 'ufo'
@ -10,6 +9,7 @@ import { env, nodeless } from 'unenv'
import type { WebpackConfigContext } from '../utils/config' import type { WebpackConfigContext } from '../utils/config'
import { applyPresets } from '../utils/config' import { applyPresets } from '../utils/config'
import { nuxt } from '../presets/nuxt' import { nuxt } from '../presets/nuxt'
import { webpack } from '#builder'
export async function client (ctx: WebpackConfigContext) { export async function client (ctx: WebpackConfigContext) {
ctx.name = 'client' ctx.name = 'client'

View File

@ -1,11 +1,11 @@
import { isAbsolute } from 'pathe' import { isAbsolute } from 'pathe'
import webpack from 'webpack'
import ForkTSCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin' import ForkTSCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'
import { logger } from '@nuxt/kit' import { logger } from '@nuxt/kit'
import type { WebpackConfigContext } from '../utils/config' import type { WebpackConfigContext } from '../utils/config'
import { applyPresets } from '../utils/config' import { applyPresets } from '../utils/config'
import { nuxt } from '../presets/nuxt' import { nuxt } from '../presets/nuxt'
import { node } from '../presets/node' import { node } from '../presets/node'
import { webpack } from '#builder'
const assetPattern = /\.(?:css|s[ca]ss|png|jpe?g|gif|svg|woff2?|eot|ttf|otf|webp|webm|mp4|ogv)(?:\?.*)?$/i const assetPattern = /\.(?:css|s[ca]ss|png|jpe?g|gif|svg|woff2?|eot|ttf|otf|webp|webm|mp4|ogv)(?:\?.*)?$/i

View File

@ -1,9 +1,10 @@
import type { Compiler } from 'webpack' import type { Compiler } from 'webpack'
import webpack from 'webpack' import { webpack } from '#builder'
const pluginName = 'ChunkErrorPlugin' const pluginName = 'ChunkErrorPlugin'
const script = ` export class ChunkErrorPlugin {
script = `
if (typeof ${webpack.RuntimeGlobals.require} !== "undefined") { if (typeof ${webpack.RuntimeGlobals.require} !== "undefined") {
var _ensureChunk = ${webpack.RuntimeGlobals.ensureChunk}; var _ensureChunk = ${webpack.RuntimeGlobals.ensureChunk};
${webpack.RuntimeGlobals.ensureChunk} = function (chunkId) { ${webpack.RuntimeGlobals.ensureChunk} = function (chunkId) {
@ -16,12 +17,11 @@ if (typeof ${webpack.RuntimeGlobals.require} !== "undefined") {
}; };
};` };`
export class ChunkErrorPlugin {
apply (compiler: Compiler) { apply (compiler: Compiler) {
compiler.hooks.thisCompilation.tap(pluginName, compilation => compiler.hooks.thisCompilation.tap(pluginName, compilation =>
compilation.mainTemplate.hooks.localVars.tap( compilation.mainTemplate.hooks.localVars.tap(
{ name: pluginName, stage: 1 }, { name: pluginName, stage: 1 },
source => source + script, source => source + this.script,
), ),
) )
} }

View File

@ -7,7 +7,7 @@ import { mkdir, writeFile } from 'node:fs/promises'
import { normalizeWebpackManifest } from 'vue-bundle-renderer' import { normalizeWebpackManifest } from 'vue-bundle-renderer'
import { dirname } from 'pathe' import { dirname } from 'pathe'
import hash from 'hash-sum' import { hash } from 'ohash'
import type { Nuxt } from '@nuxt/schema' import type { Nuxt } from '@nuxt/schema'
import type { Compilation, Compiler } from 'webpack' import type { Compilation, Compiler } from 'webpack'

View File

@ -1,6 +1,6 @@
import type { Compilation, Compiler } from 'webpack' import type { Compilation, Compiler } from 'webpack'
import webpack from 'webpack'
import { extractQueryPartJS, isJS, validate } from './util' import { extractQueryPartJS, isJS, validate } from './util'
import { webpack } from '#builder'
interface VueSSRServerPluginOptions { interface VueSSRServerPluginOptions {
filename: string filename: string

View File

@ -3,7 +3,6 @@ import { normalize, resolve } from 'pathe'
import TimeFixPlugin from 'time-fix-plugin' import TimeFixPlugin from 'time-fix-plugin'
import WebpackBar from 'webpackbar' import WebpackBar from 'webpackbar'
import type { Configuration } from 'webpack' import type { Configuration } from 'webpack'
import webpack from 'webpack'
import { logger } from '@nuxt/kit' import { logger } from '@nuxt/kit'
// @ts-expect-error missing types // @ts-expect-error missing types
import FriendlyErrorsWebpackPlugin from '@nuxt/friendly-errors-webpack-plugin' import FriendlyErrorsWebpackPlugin from '@nuxt/friendly-errors-webpack-plugin'
@ -16,6 +15,8 @@ import WarningIgnorePlugin from '../plugins/warning-ignore'
import type { WebpackConfigContext } from '../utils/config' import type { WebpackConfigContext } from '../utils/config'
import { applyPresets, fileName } from '../utils/config' import { applyPresets, fileName } from '../utils/config'
import { builder, webpack } from '#builder'
export async function base (ctx: WebpackConfigContext) { export async function base (ctx: WebpackConfigContext) {
await applyPresets(ctx, [ await applyPresets(ctx, [
baseAlias, baseAlias,
@ -53,14 +54,18 @@ function basePlugins (ctx: WebpackConfigContext) {
// Add timefix-plugin before other plugins // Add timefix-plugin before other plugins
if (ctx.options.dev) { if (ctx.options.dev) {
ctx.config.plugins.push(new TimeFixPlugin()) if (ctx.nuxt.options.builder !== '@nuxt/rspack-builder') {
ctx.config.plugins.push(new TimeFixPlugin())
}
} }
// User plugins // User plugins
ctx.config.plugins.push(...(ctx.userConfig.plugins || [])) ctx.config.plugins.push(...(ctx.userConfig.plugins || []))
// Ignore empty warnings // Ignore empty warnings
ctx.config.plugins.push(new WarningIgnorePlugin(getWarningIgnoreFilter(ctx))) if (ctx.nuxt.options.builder !== '@nuxt/rspack-builder') {
ctx.config.plugins.push(new WarningIgnorePlugin(getWarningIgnoreFilter(ctx)))
}
// Provide env via DefinePlugin // Provide env via DefinePlugin
ctx.config.plugins.push(new webpack.DefinePlugin(getEnv(ctx))) ctx.config.plugins.push(new webpack.DefinePlugin(getEnv(ctx)))
@ -93,21 +98,21 @@ function basePlugins (ctx: WebpackConfigContext) {
reporter: { reporter: {
change: (_, { shortPath }) => { change: (_, { shortPath }) => {
if (!ctx.isServer) { if (!ctx.isServer) {
ctx.nuxt.callHook('webpack:change', shortPath) ctx.nuxt.callHook(`${builder}:change`, shortPath)
} }
}, },
done: ({ state }) => { done: ({ state }) => {
if (state.hasErrors) { if (state.hasErrors) {
ctx.nuxt.callHook('webpack:error') ctx.nuxt.callHook(`${builder}:error`)
} else { } else {
logger.success(`${state.name} ${state.message}`) logger.success(`${state.name} ${state.message}`)
} }
}, },
allDone: () => { allDone: () => {
ctx.nuxt.callHook('webpack:done') ctx.nuxt.callHook(`${builder}:done`)
}, },
progress ({ statesArray }) { progress ({ statesArray }) {
ctx.nuxt.callHook('webpack:progress', statesArray) ctx.nuxt.callHook(`${builder}:progress`, statesArray)
}, },
}, },
}, },
@ -150,7 +155,7 @@ function baseTranspile (ctx: WebpackConfigContext) {
/\.vue\.js/i, // include SFCs in node_modules /\.vue\.js/i, // include SFCs in node_modules
/consola\/src/, /consola\/src/,
/vue-demi/, /vue-demi/,
/(^|\/)nuxt\/(dist\/)?(app|[^/]+\/runtime)($|\/)/, /(^|\/)nuxt\/(src\/|dist\/)?(app|[^/]+\/runtime)($|\/)/,
] ]
for (let pattern of ctx.options.build.transpile) { for (let pattern of ctx.options.build.transpile) {

View File

@ -1,9 +1,10 @@
import MiniCssExtractPlugin from 'mini-css-extract-plugin'
import CssMinimizerPlugin from 'css-minimizer-webpack-plugin' import CssMinimizerPlugin from 'css-minimizer-webpack-plugin'
import type { WebpackConfigContext } from '../utils/config' import type { WebpackConfigContext } from '../utils/config'
import { applyPresets, fileName } from '../utils/config' import { applyPresets, fileName } from '../utils/config'
import { getPostcssConfig } from '../utils/postcss' import { getPostcssConfig } from '../utils/postcss'
import { MiniCssExtractPlugin } from '#builder'
export async function style (ctx: WebpackConfigContext) { export async function style (ctx: WebpackConfigContext) {
await applyPresets(ctx, [ await applyPresets(ctx, [
loaders, loaders,

View File

@ -1,10 +1,11 @@
import { resolve } from 'pathe' import { resolve } from 'pathe'
import VueLoaderPlugin from 'vue-loader/dist/pluginWebpack5.js' import VueLoaderPlugin from 'vue-loader/dist/pluginWebpack5.js'
import webpack from 'webpack'
import VueSSRClientPlugin from '../plugins/vue/client' import VueSSRClientPlugin from '../plugins/vue/client'
import VueSSRServerPlugin from '../plugins/vue/server' import VueSSRServerPlugin from '../plugins/vue/server'
import type { WebpackConfigContext } from '../utils/config' import type { WebpackConfigContext } from '../utils/config'
import { webpack } from '#builder'
export function vue (ctx: WebpackConfigContext) { export function vue (ctx: WebpackConfigContext) {
// @ts-expect-error de-default vue-loader // @ts-expect-error de-default vue-loader
ctx.config.plugins!.push(new (VueLoaderPlugin.default || VueLoaderPlugin)()) ctx.config.plugins!.push(new (VueLoaderPlugin.default || VueLoaderPlugin)())
@ -30,7 +31,8 @@ export function vue (ctx: WebpackConfigContext) {
// https://github.com/vuejs/vue-next/tree/master/packages/vue#bundler-build-feature-flags // https://github.com/vuejs/vue-next/tree/master/packages/vue#bundler-build-feature-flags
// TODO: Provide options to toggle // TODO: Provide options to toggle
ctx.config.plugins!.push(new webpack.DefinePlugin({ ctx.config.plugins!.push(new webpack.DefinePlugin({
__VUE_OPTIONS_API__: 'true', '__VUE_OPTIONS_API__': 'true',
__VUE_PROD_DEVTOOLS__: 'false', '__VUE_PROD_DEVTOOLS__': 'false',
'__VUE_PROD_HYDRATION_MISMATCH_DETAILS__': ctx.nuxt.options.debug,
})) }))
} }

View File

@ -1,5 +1,4 @@
import pify from 'pify' import pify from 'pify'
import webpack from 'webpack'
import type { NodeMiddleware } from 'h3' import type { NodeMiddleware } from 'h3'
import { resolve } from 'pathe' import { resolve } from 'pathe'
import { defineEventHandler, fromNodeMiddleware } from 'h3' import { defineEventHandler, fromNodeMiddleware } from 'h3'
@ -21,6 +20,8 @@ import { client, server } from './configs'
import { applyPresets, createWebpackConfigContext, getWebpackConfig } from './utils/config' import { applyPresets, createWebpackConfigContext, getWebpackConfig } from './utils/config'
import { dynamicRequire } from './nitro/plugins/dynamic-require' import { dynamicRequire } from './nitro/plugins/dynamic-require'
import { builder, webpack } from '#builder'
// TODO: Support plugins // TODO: Support plugins
// const plugins: string[] = [] // const plugins: string[] = []
@ -52,7 +53,7 @@ export const bundle: NuxtBuilder['bundle'] = async (nuxt) => {
prerenderRollupPlugins.push(dynamicRequirePlugin) prerenderRollupPlugins.push(dynamicRequirePlugin)
rollupPlugins.push(dynamicRequirePlugin) rollupPlugins.push(dynamicRequirePlugin)
await nuxt.callHook('webpack:config', webpackConfigs) await nuxt.callHook(`${builder}:config`, webpackConfigs)
// Initialize shared MFS for dev // Initialize shared MFS for dev
const mfs = nuxt.options.dev ? createMFS() : null const mfs = nuxt.options.dev ? createMFS() : null
@ -62,7 +63,7 @@ export const bundle: NuxtBuilder['bundle'] = async (nuxt) => {
sourcemap: !!nuxt.options.sourcemap[config.name as 'client' | 'server'], sourcemap: !!nuxt.options.sourcemap[config.name as 'client' | 'server'],
})) }))
// Emit chunk errors if the user has opted in to `experimental.emitRouteChunkError` // Emit chunk errors if the user has opted in to `experimental.emitRouteChunkError`
if (config.name === 'client' && nuxt.options.experimental.emitRouteChunkError) { if (config.name === 'client' && nuxt.options.experimental.emitRouteChunkError && nuxt.options.builder !== '@nuxt/rspack-builder') {
config.plugins!.push(new ChunkErrorPlugin()) config.plugins!.push(new ChunkErrorPlugin())
} }
config.plugins!.push(composableKeysPlugin.webpack({ config.plugins!.push(composableKeysPlugin.webpack({
@ -72,7 +73,7 @@ export const bundle: NuxtBuilder['bundle'] = async (nuxt) => {
})) }))
} }
await nuxt.callHook('webpack:configResolved', webpackConfigs) await nuxt.callHook(`${builder}:configResolved`, webpackConfigs)
// Configure compilers // Configure compilers
const compilers = webpackConfigs.map((config) => { const compilers = webpackConfigs.map((config) => {
@ -142,11 +143,11 @@ async function createDevMiddleware (compiler: Compiler) {
async function compile (compiler: Compiler) { async function compile (compiler: Compiler) {
const nuxt = useNuxt() const nuxt = useNuxt()
await nuxt.callHook('webpack:compile', { name: compiler.options.name!, compiler }) await nuxt.callHook(`${builder}:compile`, { name: compiler.options.name!, compiler })
// Load renderer resources after build // Load renderer resources after build
compiler.hooks.done.tap('load-resources', async (stats) => { compiler.hooks.done.tap('load-resources', async (stats) => {
await nuxt.callHook('webpack:compiled', { name: compiler.options.name!, compiler, stats }) await nuxt.callHook(`${builder}:compiled`, { name: compiler.options.name!, compiler, stats })
}) })
// --- Dev Build --- // --- Dev Build ---

View File

@ -10,6 +10,7 @@ overrides:
'@nuxt/ui-templates': workspace:* '@nuxt/ui-templates': workspace:*
'@nuxt/vite-builder': workspace:* '@nuxt/vite-builder': workspace:*
'@nuxt/webpack-builder': workspace:* '@nuxt/webpack-builder': workspace:*
'@nuxt/rspack-builder': workspace:*
'@types/node': 20.16.11 '@types/node': 20.16.11
'@vue/compiler-core': 3.5.11 '@vue/compiler-core': 3.5.11
'@vue/compiler-dom': 3.5.11 '@vue/compiler-dom': 3.5.11
@ -43,6 +44,9 @@ importers:
'@nuxt/kit': '@nuxt/kit':
specifier: workspace:* specifier: workspace:*
version: link:packages/kit version: link:packages/kit
'@nuxt/rspack-builder':
specifier: workspace:*
version: link:packages/rspack
'@nuxt/test-utils': '@nuxt/test-utils':
specifier: 3.14.3 specifier: 3.14.3
version: 3.14.3(@testing-library/vue@8.1.0(@vue/compiler-sfc@3.5.11)(vue@3.5.11(typescript@5.6.3)))(@vue/test-utils@2.4.6)(h3-nightly@2.0.0-1718872656.6765a6e)(happy-dom@15.7.4)(magicast@0.3.5)(nitropack@2.9.7(magicast@0.3.5)(webpack-sources@3.2.3))(playwright-core@1.48.0)(vite@5.4.8(@types/node@20.16.11)(sass@1.78.0)(terser@5.32.0))(vitest@2.1.2(@types/node@20.16.11)(happy-dom@15.7.4)(sass@1.78.0)(terser@5.32.0))(vue-router@4.4.5(vue@3.5.11(typescript@5.6.3)))(vue@3.5.11(typescript@5.6.3))(webpack-sources@3.2.3) version: 3.14.3(@testing-library/vue@8.1.0(@vue/compiler-sfc@3.5.11)(vue@3.5.11(typescript@5.6.3)))(@vue/test-utils@2.4.6)(h3-nightly@2.0.0-1718872656.6765a6e)(happy-dom@15.7.4)(magicast@0.3.5)(nitropack@2.9.7(magicast@0.3.5)(webpack-sources@3.2.3))(playwright-core@1.48.0)(vite@5.4.8(@types/node@20.16.11)(sass@1.78.0)(terser@5.32.0))(vitest@2.1.2(@types/node@20.16.11)(happy-dom@15.7.4)(sass@1.78.0)(terser@5.32.0))(vue-router@4.4.5(vue@3.5.11(typescript@5.6.3)))(vue@3.5.11(typescript@5.6.3))(webpack-sources@3.2.3)
@ -245,6 +249,9 @@ importers:
specifier: ^1.5.1 specifier: ^1.5.1
version: 1.5.1 version: 1.5.1
devDependencies: devDependencies:
'@rspack/core':
specifier: 1.0.8
version: 1.0.8
'@types/hash-sum': '@types/hash-sum':
specifier: 1.0.2 specifier: 1.0.2
version: 1.0.2 version: 1.0.2
@ -493,6 +500,169 @@ importers:
specifier: 2.1.2 specifier: 2.1.2
version: 2.1.2(@types/node@20.16.11)(happy-dom@15.7.4)(sass@1.78.0)(terser@5.32.0) version: 2.1.2(@types/node@20.16.11)(happy-dom@15.7.4)(sass@1.78.0)(terser@5.32.0)
packages/rspack:
dependencies:
'@nuxt/friendly-errors-webpack-plugin':
specifier: ^2.6.0
version: 2.6.0(webpack@5.95.0)
'@nuxt/kit':
specifier: workspace:*
version: link:../kit
'@rspack/core':
specifier: ^1.0.8
version: 1.0.8
autoprefixer:
specifier: ^10.4.20
version: 10.4.20(postcss@8.4.47)
css-loader:
specifier: ^7.1.2
version: 7.1.2(@rspack/core@1.0.8)(webpack@5.95.0)
css-minimizer-webpack-plugin:
specifier: ^7.0.0
version: 7.0.0(webpack@5.95.0)
cssnano:
specifier: ^7.0.6
version: 7.0.6(postcss@8.4.47)
defu:
specifier: ^6.1.4
version: 6.1.4
esbuild-loader:
specifier: ^4.2.2
version: 4.2.2(webpack@5.95.0)
escape-string-regexp:
specifier: ^5.0.0
version: 5.0.0
estree-walker:
specifier: ^3.0.3
version: 3.0.3
file-loader:
specifier: ^6.2.0
version: 6.2.0(webpack@5.95.0)
fork-ts-checker-webpack-plugin:
specifier: ^9.0.2
version: 9.0.2(typescript@5.6.3)(webpack@5.95.0)
globby:
specifier: ^14.0.2
version: 14.0.2
h3:
specifier: npm:h3-nightly@2.0.0-1718872656.6765a6e
version: h3-nightly@2.0.0-1718872656.6765a6e
hash-sum:
specifier: ^2.0.0
version: 2.0.0
jiti:
specifier: 2.3.3
version: 2.3.3
knitwork:
specifier: ^1.1.0
version: 1.1.0
lodash-es:
specifier: 4.17.21
version: 4.17.21
magic-string:
specifier: ^0.30.11
version: 0.30.11
memfs:
specifier: ^4.13.0
version: 4.13.0
mlly:
specifier: ^1.7.2
version: 1.7.2
ohash:
specifier: 1.1.4
version: 1.1.4
pathe:
specifier: ^1.1.2
version: 1.1.2
pify:
specifier: ^6.1.0
version: 6.1.0
postcss:
specifier: 8.4.47
version: 8.4.47
postcss-import:
specifier: ^16.1.0
version: 16.1.0(postcss@8.4.47)
postcss-import-resolver:
specifier: ^2.0.0
version: 2.0.0
postcss-loader:
specifier: ^8.1.1
version: 8.1.1(@rspack/core@1.0.8)(postcss@8.4.47)(typescript@5.6.3)(webpack@5.95.0)
postcss-url:
specifier: ^10.1.3
version: 10.1.3(postcss@8.4.47)
pug-plain-loader:
specifier: ^1.1.0
version: 1.1.0(pug@3.0.3)
std-env:
specifier: ^3.7.0
version: 3.7.0
time-fix-plugin:
specifier: ^2.0.7
version: 2.0.7(webpack@5.95.0)
ufo:
specifier: 1.5.4
version: 1.5.4
unenv:
specifier: ^1.10.0
version: 1.10.0
unplugin:
specifier: ^1.14.1
version: 1.14.1(webpack-sources@3.2.3)
url-loader:
specifier: ^4.1.1
version: 4.1.1(file-loader@6.2.0(webpack@5.95.0))(webpack@5.95.0)
vue-bundle-renderer:
specifier: ^2.1.1
version: 2.1.1
vue-loader:
specifier: ^17.4.2
version: 17.4.2(@vue/compiler-sfc@3.5.11)(vue@3.5.11(typescript@5.6.3))(webpack@5.95.0)
webpack-bundle-analyzer:
specifier: ^4.10.2
version: 4.10.2
webpack-dev-middleware:
specifier: ^7.4.2
version: 7.4.2(webpack@5.95.0)
webpack-hot-middleware:
specifier: ^2.26.1
version: 2.26.1
webpack-virtual-modules:
specifier: ^0.6.2
version: 0.6.2
webpackbar:
specifier: ^6.0.1
version: 6.0.1(webpack@5.95.0)
devDependencies:
'@nuxt/schema':
specifier: workspace:*
version: link:../schema
'@types/hash-sum':
specifier: 1.0.2
version: 1.0.2
'@types/lodash-es':
specifier: 4.17.12
version: 4.17.12
'@types/pify':
specifier: 5.0.4
version: 5.0.4
'@types/webpack-bundle-analyzer':
specifier: 4.7.0
version: 4.7.0
'@types/webpack-hot-middleware':
specifier: 2.25.9
version: 2.25.9
rollup:
specifier: 4.24.0
version: 4.24.0
unbuild:
specifier: 3.0.0-rc.11
version: 3.0.0-rc.11(sass@1.78.0)(typescript@5.6.3)(vue-tsc@2.1.6(typescript@5.6.3))
vue:
specifier: 3.5.11
version: 3.5.11(typescript@5.6.3)
packages/schema: packages/schema:
dependencies: dependencies:
compatx: compatx:
@ -793,7 +963,7 @@ importers:
version: 10.4.20(postcss@8.4.47) version: 10.4.20(postcss@8.4.47)
css-loader: css-loader:
specifier: ^7.1.2 specifier: ^7.1.2
version: 7.1.2(webpack@5.95.0) version: 7.1.2(@rspack/core@1.0.8)(webpack@5.95.0)
css-minimizer-webpack-plugin: css-minimizer-webpack-plugin:
specifier: ^7.0.0 specifier: ^7.0.0
version: 7.0.0(webpack@5.95.0) version: 7.0.0(webpack@5.95.0)
@ -868,7 +1038,7 @@ importers:
version: 2.0.0 version: 2.0.0
postcss-loader: postcss-loader:
specifier: ^8.1.1 specifier: ^8.1.1
version: 8.1.1(postcss@8.4.47)(typescript@5.6.3)(webpack@5.95.0) version: 8.1.1(@rspack/core@1.0.8)(postcss@8.4.47)(typescript@5.6.3)(webpack@5.95.0)
postcss-url: postcss-url:
specifier: ^10.1.3 specifier: ^10.1.3
version: 10.1.3(postcss@8.4.47) version: 10.1.3(postcss@8.4.47)
@ -918,6 +1088,9 @@ importers:
'@nuxt/schema': '@nuxt/schema':
specifier: workspace:* specifier: workspace:*
version: link:../schema version: link:../schema
'@rspack/core':
specifier: 1.0.8
version: 1.0.8
'@types/hash-sum': '@types/hash-sum':
specifier: 1.0.2 specifier: 1.0.2
version: 1.0.2 version: 1.0.2
@ -951,6 +1124,9 @@ importers:
test/fixtures/basic: test/fixtures/basic:
dependencies: dependencies:
'@nuxt/rspack-builder':
specifier: workspace:*
version: link:../../../packages/rspack
'@nuxt/webpack-builder': '@nuxt/webpack-builder':
specifier: workspace:* specifier: workspace:*
version: link:../../../packages/webpack version: link:../../../packages/webpack
@ -1930,6 +2106,18 @@ packages:
resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==}
hasBin: true hasBin: true
'@module-federation/runtime-tools@0.5.1':
resolution: {integrity: sha512-nfBedkoZ3/SWyO0hnmaxuz0R0iGPSikHZOAZ0N/dVSQaIzlffUo35B5nlC2wgWIc0JdMZfkwkjZRrnuuDIJbzg==}
'@module-federation/runtime@0.5.1':
resolution: {integrity: sha512-xgiMUWwGLWDrvZc9JibuEbXIbhXg6z2oUkemogSvQ4LKvrl/n0kbqP1Blk669mXzyWbqtSp6PpvNdwaE1aN5xQ==}
'@module-federation/sdk@0.5.1':
resolution: {integrity: sha512-exvchtjNURJJkpqjQ3/opdbfeT2wPKvrbnGnyRkrwW5o3FH1LaST1tkiNviT6OXTexGaVc2DahbdniQHVtQ7pA==}
'@module-federation/webpack-bundler-runtime@0.5.1':
resolution: {integrity: sha512-mMhRFH0k2VjwHt3Jol9JkUsmI/4XlrAoBG3E0o7HoyoPYv1UFOWyqAflfANcUPgbYpvqmyLzDcO+3IT36LXnrA==}
'@netlify/functions@2.8.1': '@netlify/functions@2.8.1':
resolution: {integrity: sha512-+6wtYdoz0yE06dSa9XkP47tw5zm6g13QMeCwM3MmHx1vn8hzwFa51JtmfraprdkL7amvb7gaNM+OOhQU1h6T8A==} resolution: {integrity: sha512-+6wtYdoz0yE06dSa9XkP47tw5zm6g13QMeCwM3MmHx1vn8hzwFa51JtmfraprdkL7amvb7gaNM+OOhQU1h6T8A==}
engines: {node: '>=14.0.0'} engines: {node: '>=14.0.0'}
@ -2338,6 +2526,67 @@ packages:
cpu: [x64] cpu: [x64]
os: [win32] os: [win32]
'@rspack/binding-darwin-arm64@1.0.8':
resolution: {integrity: sha512-1l8/eg3HNz53DHQO3fy5O5QKdYh8hSMZaWGtm3NR5IfdrTm2TaLL9tuR8oL2iHHtd87LEvVKHXdjlcuLV5IPNQ==}
cpu: [arm64]
os: [darwin]
'@rspack/binding-darwin-x64@1.0.8':
resolution: {integrity: sha512-7BbG8gXVWjtqJegDpsObzM/B90Eig1piEtcahvPdvlC92uZz3/IwtKPpMaywGBrf5RSI3U0nQMSekwz0cO1SOw==}
cpu: [x64]
os: [darwin]
'@rspack/binding-linux-arm64-gnu@1.0.8':
resolution: {integrity: sha512-QnqCL0wmwYqT/IFx5q0aw7DsIOr8oYUa4+7JI8iiqRf3RuuRJExesVW9VuWr0jS2UvChKgmb8PvRtDy/0tshFw==}
cpu: [arm64]
os: [linux]
'@rspack/binding-linux-arm64-musl@1.0.8':
resolution: {integrity: sha512-Ns9TsE7zdUjimW5HURRW08BaMyAh16MDh97PPsGEMeRPx9plnRO9aXvuUG6t+0gy4KwlQdeq3BvUsbBpIo5Tow==}
cpu: [arm64]
os: [linux]
'@rspack/binding-linux-x64-gnu@1.0.8':
resolution: {integrity: sha512-lfqUuKCoyRN/gGeokhX/oNYqB6OpbtgQb57b0QuD8IaiH2a1ee0TtEVvRbyQNEDwht6lW4RTNg0RfMYu52LgXg==}
cpu: [x64]
os: [linux]
'@rspack/binding-linux-x64-musl@1.0.8':
resolution: {integrity: sha512-MgbHJWV5utVa1/U9skrXClydZ/eZw001++v4B6nb8myU6Ck1D02aMl9ESefb/sSA8TatLLxEXQ2VENG9stnPwQ==}
cpu: [x64]
os: [linux]
'@rspack/binding-win32-arm64-msvc@1.0.8':
resolution: {integrity: sha512-3NN5VisnSOzhgqX77O/7NvcjPUueg1oIdMKoc5vElJCEu5FEXPqDhwZmr1PpBovaXshAcgExF3j54+20pwdg5g==}
cpu: [arm64]
os: [win32]
'@rspack/binding-win32-ia32-msvc@1.0.8':
resolution: {integrity: sha512-17VQNC7PSygzsipSVoukDM/SOcVueVNsk9bZiB0Swl20BaqrlBts2Dvlmo+L+ZGsxOYI97WvA/zomMDv860usg==}
cpu: [ia32]
os: [win32]
'@rspack/binding-win32-x64-msvc@1.0.8':
resolution: {integrity: sha512-Vtjt74Soh09XUsV5Nw0YjZVSk/qtsjtPnzbSZluncSAVUs8l+X1ALcM6n1Jrt3TLTfcqf7a+VIsWOXAMqkCGUg==}
cpu: [x64]
os: [win32]
'@rspack/binding@1.0.8':
resolution: {integrity: sha512-abRirbrjobcllLAamyeiWxT6Rb0wELUnITynQdqRbSweWm2lvnhm9YBv4BcOjvJBzhJtvRJo5JBtbKXjDTarug==}
'@rspack/core@1.0.8':
resolution: {integrity: sha512-pbXwXYb4WQwb0l35P5v3l/NpDJXy1WiVE4IcQ/6LxZYU5NyZuqtsK0trR88xIVRZb9qU0JUeCdQq7Xa6Q+c3Xw==}
engines: {node: '>=16.0.0'}
peerDependencies:
'@swc/helpers': '>=0.5.1'
peerDependenciesMeta:
'@swc/helpers':
optional: true
'@rspack/lite-tapable@1.0.1':
resolution: {integrity: sha512-VynGOEsVw2s8TAlLf/uESfrgfrq2+rcXB1muPJYBWbsm1Oa6r5qVQhjA5ggM6z/coYPrsVMgovl3Ff7Q7OCp1w==}
engines: {node: '>=16.0.0'}
'@shikijs/core@1.17.0': '@shikijs/core@1.17.0':
resolution: {integrity: sha512-Mkk4Mp4bNnW1kytU8I7S5PK5teNSe0iKlfqxPss4sdwnlcU8a2N62Z3te2gVmZfU9t1HF6L3wyWuM43IvEeEsg==} resolution: {integrity: sha512-Mkk4Mp4bNnW1kytU8I7S5PK5teNSe0iKlfqxPss4sdwnlcU8a2N62Z3te2gVmZfU9t1HF6L3wyWuM43IvEeEsg==}
@ -2383,9 +2632,6 @@ packages:
'@shikijs/vitepress-twoslash@1.17.0': '@shikijs/vitepress-twoslash@1.17.0':
resolution: {integrity: sha512-FcdZUtF1jL51fZfkITd1qEnmnVe/w8lnOGhEWptMqMNvMYzB8vxDv5y+E1zvE+rw0NbBuWtOmZea3WOah1nr6g==} resolution: {integrity: sha512-FcdZUtF1jL51fZfkITd1qEnmnVe/w8lnOGhEWptMqMNvMYzB8vxDv5y+E1zvE+rw0NbBuWtOmZea3WOah1nr6g==}
'@shikijs/vscode-textmate@9.2.2':
resolution: {integrity: sha512-TMp15K+GGYrWlZM8+Lnj9EaHEFmOen0WJBrfa17hF7taDOYthuPPV0GWzfd/9iMij0akS/8Yw2ikquH7uVi/fg==}
'@shikijs/vscode-textmate@9.3.0': '@shikijs/vscode-textmate@9.3.0':
resolution: {integrity: sha512-jn7/7ky30idSkd/O5yDBfAnVt+JJpepofP/POZ1iMOxK59cOfqIgg/Dj0eFsjOTMw+4ycJN0uhZH/Eb0bs/EUA==} resolution: {integrity: sha512-jn7/7ky30idSkd/O5yDBfAnVt+JJpepofP/POZ1iMOxK59cOfqIgg/Dj0eFsjOTMw+4ycJN0uhZH/Eb0bs/EUA==}
@ -2651,32 +2897,18 @@ packages:
'@ungap/structured-clone@1.2.0': '@ungap/structured-clone@1.2.0':
resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==}
'@unhead/dom@1.11.6':
resolution: {integrity: sha512-FYU8Cu+XWcpbO4OvXdB6x7m6GTPcl6CW7igI8rNu6Kc0Ilxb+atxIvyFXdTGAyB7h/F0w3ex06ZVWJ65f3EW8A==}
'@unhead/dom@1.11.7': '@unhead/dom@1.11.7':
resolution: {integrity: sha512-Nj2ulnbY5lvIcxqXwdO5YfdvLm8EYLjcaOje2b2aQnfyPAyOIVeR8iB79DDKk/uZZAPEwkdhSnUdEh9Ny0b3lw==} resolution: {integrity: sha512-Nj2ulnbY5lvIcxqXwdO5YfdvLm8EYLjcaOje2b2aQnfyPAyOIVeR8iB79DDKk/uZZAPEwkdhSnUdEh9Ny0b3lw==}
'@unhead/schema@1.11.6':
resolution: {integrity: sha512-Ava5+kQERaZ2fi66phgR9KZQr9SsheN1YhhKM8fCP2A4Jb5lHUssVQ19P0+89V6RX9iUg/Q27WdEbznm75LzhQ==}
'@unhead/schema@1.11.7': '@unhead/schema@1.11.7':
resolution: {integrity: sha512-j9uN7T63aUXrZ6yx2CfjVT7xZHjn0PZO7TPMaWqMFjneIH/NONKvDVCMEqDlXeqdSIERIYtk/xTHgCUMer5eyw==} resolution: {integrity: sha512-j9uN7T63aUXrZ6yx2CfjVT7xZHjn0PZO7TPMaWqMFjneIH/NONKvDVCMEqDlXeqdSIERIYtk/xTHgCUMer5eyw==}
'@unhead/shared@1.11.6':
resolution: {integrity: sha512-aGrtzRCcFlVh9iru73fBS8FA1vpQskS190t5cCRRMpisOEunVv3ueqXN1F8CseQd0W4wyEr/ycDvdfKt+RPv5g==}
'@unhead/shared@1.11.7': '@unhead/shared@1.11.7':
resolution: {integrity: sha512-5v3PmV1LMyikGyQi/URYS5ilH8dg1Iomtja7iFWke990O8RBDEzAdagJqcsUE/fw+o7cXRSOamyx5wCf5Q1TrA==} resolution: {integrity: sha512-5v3PmV1LMyikGyQi/URYS5ilH8dg1Iomtja7iFWke990O8RBDEzAdagJqcsUE/fw+o7cXRSOamyx5wCf5Q1TrA==}
'@unhead/ssr@1.11.7': '@unhead/ssr@1.11.7':
resolution: {integrity: sha512-qI1zNFY8fU5S9EhroxlXSA5Q/XKbWAKXrVVNG+6bIh/IRrMOMJrPk4d1GmphF4gmNri3ARqly+OWx4VVaj0scA==} resolution: {integrity: sha512-qI1zNFY8fU5S9EhroxlXSA5Q/XKbWAKXrVVNG+6bIh/IRrMOMJrPk4d1GmphF4gmNri3ARqly+OWx4VVaj0scA==}
'@unhead/vue@1.11.6':
resolution: {integrity: sha512-CMuDJGTi4n4wKdOp6/JmB9roGshjTdoFKF34PEkXu4+g97BiVFiZ9LvgY44+UlWCUzQHcqEPRQIzm9iKEqcfKw==}
peerDependencies:
vue: 3.5.11
'@unhead/vue@1.11.7': '@unhead/vue@1.11.7':
resolution: {integrity: sha512-SLr0eQfznVp63iKi47L4s5Yz+oiQjDA82VBP4jlXi7dM9fSIn1ul1aKvBqle/ZxI2cqY8zVGz60EjhjWeu754A==} resolution: {integrity: sha512-SLr0eQfznVp63iKi47L4s5Yz+oiQjDA82VBP4jlXi7dM9fSIn1ul1aKvBqle/ZxI2cqY8zVGz60EjhjWeu754A==}
peerDependencies: peerDependencies:
@ -6979,9 +7211,6 @@ packages:
unenv@1.10.0: unenv@1.10.0:
resolution: {integrity: sha512-wY5bskBQFL9n3Eca5XnhH6KbUo/tfvkwm9OpcdCvLaeA7piBNbavbOKJySEwQ1V0RH6HvNlSAFRTpvTqgKRQXQ==} resolution: {integrity: sha512-wY5bskBQFL9n3Eca5XnhH6KbUo/tfvkwm9OpcdCvLaeA7piBNbavbOKJySEwQ1V0RH6HvNlSAFRTpvTqgKRQXQ==}
unhead@1.11.6:
resolution: {integrity: sha512-TKTQGUzHKF925VZ4KZVbLfKFzTVTEWfPLaXKmkd/ptEY2FHEoJUF7xOpAWc3K7Jzy/ExS66TL7GnLLjtd4sISg==}
unhead@1.11.7: unhead@1.11.7:
resolution: {integrity: sha512-aA0+JBRryLhDKUq6L2JhMDLZEG/ElyyDASyC9wiwDl6nvvsj9hD26LgPWgmAsSd+9HtMGM2N1gU27CWEMo16CQ==} resolution: {integrity: sha512-aA0+JBRryLhDKUq6L2JhMDLZEG/ElyyDASyC9wiwDl6nvvsj9hD26LgPWgmAsSd+9HtMGM2N1gU27CWEMo16CQ==}
@ -8310,6 +8539,22 @@ snapshots:
- encoding - encoding
- supports-color - supports-color
'@module-federation/runtime-tools@0.5.1':
dependencies:
'@module-federation/runtime': 0.5.1
'@module-federation/webpack-bundler-runtime': 0.5.1
'@module-federation/runtime@0.5.1':
dependencies:
'@module-federation/sdk': 0.5.1
'@module-federation/sdk@0.5.1': {}
'@module-federation/webpack-bundler-runtime@0.5.1':
dependencies:
'@module-federation/runtime': 0.5.1
'@module-federation/sdk': 0.5.1
'@netlify/functions@2.8.1': '@netlify/functions@2.8.1':
dependencies: dependencies:
'@netlify/serverless-functions-api': 1.19.1 '@netlify/serverless-functions-api': 1.19.1
@ -8505,7 +8750,7 @@ snapshots:
'@types/stripe-v3': 3.1.33 '@types/stripe-v3': 3.1.33
'@types/vimeo__player': 2.18.3 '@types/vimeo__player': 2.18.3
'@types/youtube': 0.1.0 '@types/youtube': 0.1.0
'@unhead/vue': 1.11.6(vue@3.5.11(typescript@5.6.3)) '@unhead/vue': 1.11.7(vue@3.5.11(typescript@5.6.3))
'@vueuse/core': 11.1.0(vue@3.5.11(typescript@5.6.3)) '@vueuse/core': 11.1.0(vue@3.5.11(typescript@5.6.3))
consola: 3.2.3 consola: 3.2.3
defu: 6.1.4 defu: 6.1.4
@ -8908,12 +9153,60 @@ snapshots:
'@rollup/rollup-win32-x64-msvc@4.24.0': '@rollup/rollup-win32-x64-msvc@4.24.0':
optional: true optional: true
'@rspack/binding-darwin-arm64@1.0.8':
optional: true
'@rspack/binding-darwin-x64@1.0.8':
optional: true
'@rspack/binding-linux-arm64-gnu@1.0.8':
optional: true
'@rspack/binding-linux-arm64-musl@1.0.8':
optional: true
'@rspack/binding-linux-x64-gnu@1.0.8':
optional: true
'@rspack/binding-linux-x64-musl@1.0.8':
optional: true
'@rspack/binding-win32-arm64-msvc@1.0.8':
optional: true
'@rspack/binding-win32-ia32-msvc@1.0.8':
optional: true
'@rspack/binding-win32-x64-msvc@1.0.8':
optional: true
'@rspack/binding@1.0.8':
optionalDependencies:
'@rspack/binding-darwin-arm64': 1.0.8
'@rspack/binding-darwin-x64': 1.0.8
'@rspack/binding-linux-arm64-gnu': 1.0.8
'@rspack/binding-linux-arm64-musl': 1.0.8
'@rspack/binding-linux-x64-gnu': 1.0.8
'@rspack/binding-linux-x64-musl': 1.0.8
'@rspack/binding-win32-arm64-msvc': 1.0.8
'@rspack/binding-win32-ia32-msvc': 1.0.8
'@rspack/binding-win32-x64-msvc': 1.0.8
'@rspack/core@1.0.8':
dependencies:
'@module-federation/runtime-tools': 0.5.1
'@rspack/binding': 1.0.8
'@rspack/lite-tapable': 1.0.1
caniuse-lite: 1.0.30001667
'@rspack/lite-tapable@1.0.1': {}
'@shikijs/core@1.17.0': '@shikijs/core@1.17.0':
dependencies: dependencies:
'@shikijs/engine-javascript': 1.17.0 '@shikijs/engine-javascript': 1.17.0
'@shikijs/engine-oniguruma': 1.17.0 '@shikijs/engine-oniguruma': 1.17.0
'@shikijs/types': 1.17.0 '@shikijs/types': 1.17.0
'@shikijs/vscode-textmate': 9.2.2 '@shikijs/vscode-textmate': 9.3.0
'@types/hast': 3.0.4 '@types/hast': 3.0.4
hast-util-to-html: 9.0.3 hast-util-to-html: 9.0.3
@ -8922,7 +9215,7 @@ snapshots:
'@shikijs/engine-javascript': 1.20.0 '@shikijs/engine-javascript': 1.20.0
'@shikijs/engine-oniguruma': 1.20.0 '@shikijs/engine-oniguruma': 1.20.0
'@shikijs/types': 1.20.0 '@shikijs/types': 1.20.0
'@shikijs/vscode-textmate': 9.2.2 '@shikijs/vscode-textmate': 9.3.0
'@types/hast': 3.0.4 '@types/hast': 3.0.4
hast-util-to-html: 9.0.3 hast-util-to-html: 9.0.3
@ -8944,7 +9237,7 @@ snapshots:
'@shikijs/engine-javascript@1.20.0': '@shikijs/engine-javascript@1.20.0':
dependencies: dependencies:
'@shikijs/types': 1.20.0 '@shikijs/types': 1.20.0
'@shikijs/vscode-textmate': 9.2.2 '@shikijs/vscode-textmate': 9.3.0
oniguruma-to-js: 0.4.3 oniguruma-to-js: 0.4.3
'@shikijs/engine-javascript@1.22.0': '@shikijs/engine-javascript@1.22.0':
@ -8956,12 +9249,12 @@ snapshots:
'@shikijs/engine-oniguruma@1.17.0': '@shikijs/engine-oniguruma@1.17.0':
dependencies: dependencies:
'@shikijs/types': 1.17.0 '@shikijs/types': 1.17.0
'@shikijs/vscode-textmate': 9.2.2 '@shikijs/vscode-textmate': 9.3.0
'@shikijs/engine-oniguruma@1.20.0': '@shikijs/engine-oniguruma@1.20.0':
dependencies: dependencies:
'@shikijs/types': 1.20.0 '@shikijs/types': 1.20.0
'@shikijs/vscode-textmate': 9.2.2 '@shikijs/vscode-textmate': 9.3.0
'@shikijs/engine-oniguruma@1.22.0': '@shikijs/engine-oniguruma@1.22.0':
dependencies: dependencies:
@ -8983,12 +9276,12 @@ snapshots:
'@shikijs/types@1.17.0': '@shikijs/types@1.17.0':
dependencies: dependencies:
'@shikijs/vscode-textmate': 9.2.2 '@shikijs/vscode-textmate': 9.3.0
'@types/hast': 3.0.4 '@types/hast': 3.0.4
'@shikijs/types@1.20.0': '@shikijs/types@1.20.0':
dependencies: dependencies:
'@shikijs/vscode-textmate': 9.2.2 '@shikijs/vscode-textmate': 9.3.0
'@types/hast': 3.0.4 '@types/hast': 3.0.4
'@shikijs/types@1.22.0': '@shikijs/types@1.22.0':
@ -9004,7 +9297,7 @@ snapshots:
mdast-util-gfm: 3.0.0 mdast-util-gfm: 3.0.0
mdast-util-to-hast: 13.2.0 mdast-util-to-hast: 13.2.0
shiki: 1.17.0 shiki: 1.17.0
twoslash: 0.2.11(typescript@5.6.3) twoslash: 0.2.12(typescript@5.6.3)
twoslash-vue: 0.2.11(typescript@5.6.3) twoslash-vue: 0.2.11(typescript@5.6.3)
vue: 3.5.11(typescript@5.6.3) vue: 3.5.11(typescript@5.6.3)
transitivePeerDependencies: transitivePeerDependencies:
@ -9012,8 +9305,6 @@ snapshots:
- supports-color - supports-color
- typescript - typescript
'@shikijs/vscode-textmate@9.2.2': {}
'@shikijs/vscode-textmate@9.3.0': {} '@shikijs/vscode-textmate@9.3.0': {}
'@sidvind/better-ajv-errors@3.0.1(ajv@8.17.1)': '@sidvind/better-ajv-errors@3.0.1(ajv@8.17.1)':
@ -9340,30 +9631,16 @@ snapshots:
'@ungap/structured-clone@1.2.0': {} '@ungap/structured-clone@1.2.0': {}
'@unhead/dom@1.11.6':
dependencies:
'@unhead/schema': 1.11.6
'@unhead/shared': 1.11.6
'@unhead/dom@1.11.7': '@unhead/dom@1.11.7':
dependencies: dependencies:
'@unhead/schema': 1.11.7 '@unhead/schema': 1.11.7
'@unhead/shared': 1.11.7 '@unhead/shared': 1.11.7
'@unhead/schema@1.11.6':
dependencies:
hookable: 5.5.3
zhead: 2.2.4
'@unhead/schema@1.11.7': '@unhead/schema@1.11.7':
dependencies: dependencies:
hookable: 5.5.3 hookable: 5.5.3
zhead: 2.2.4 zhead: 2.2.4
'@unhead/shared@1.11.6':
dependencies:
'@unhead/schema': 1.11.6
'@unhead/shared@1.11.7': '@unhead/shared@1.11.7':
dependencies: dependencies:
'@unhead/schema': 1.11.7 '@unhead/schema': 1.11.7
@ -9373,15 +9650,6 @@ snapshots:
'@unhead/schema': 1.11.7 '@unhead/schema': 1.11.7
'@unhead/shared': 1.11.7 '@unhead/shared': 1.11.7
'@unhead/vue@1.11.6(vue@3.5.11(typescript@5.6.3))':
dependencies:
'@unhead/schema': 1.11.6
'@unhead/shared': 1.11.6
defu: 6.1.4
hookable: 5.5.3
unhead: 1.11.6
vue: 3.5.11(typescript@5.6.3)
'@unhead/vue@1.11.7(vue@3.5.11(typescript@5.6.3))': '@unhead/vue@1.11.7(vue@3.5.11(typescript@5.6.3))':
dependencies: dependencies:
'@unhead/schema': 1.11.7 '@unhead/schema': 1.11.7
@ -10689,7 +10957,7 @@ snapshots:
dependencies: dependencies:
postcss: 8.4.47 postcss: 8.4.47
css-loader@7.1.2(webpack@5.95.0): css-loader@7.1.2(@rspack/core@1.0.8)(webpack@5.95.0):
dependencies: dependencies:
icss-utils: 5.1.0(postcss@8.4.47) icss-utils: 5.1.0(postcss@8.4.47)
postcss: 8.4.47 postcss: 8.4.47
@ -10700,6 +10968,7 @@ snapshots:
postcss-value-parser: 4.2.0 postcss-value-parser: 4.2.0
semver: 7.6.3 semver: 7.6.3
optionalDependencies: optionalDependencies:
'@rspack/core': 1.0.8
webpack: 5.95.0 webpack: 5.95.0
css-minimizer-webpack-plugin@7.0.0(webpack@5.95.0): css-minimizer-webpack-plugin@7.0.0(webpack@5.95.0):
@ -13169,7 +13438,7 @@ snapshots:
picocolors: 1.1.0 picocolors: 1.1.0
remark-parse: 11.0.0 remark-parse: 11.0.0
shiki: 1.20.0 shiki: 1.20.0
twoslash: 0.2.11(typescript@5.6.3) twoslash: 0.2.12(typescript@5.6.3)
typescript: 5.6.3 typescript: 5.6.3
unified: 11.0.5 unified: 11.0.5
unist-util-visit: 5.0.0 unist-util-visit: 5.0.0
@ -13456,13 +13725,14 @@ snapshots:
read-cache: 1.0.0 read-cache: 1.0.0
resolve: 1.22.8 resolve: 1.22.8
postcss-loader@8.1.1(postcss@8.4.47)(typescript@5.6.3)(webpack@5.95.0): postcss-loader@8.1.1(@rspack/core@1.0.8)(postcss@8.4.47)(typescript@5.6.3)(webpack@5.95.0):
dependencies: dependencies:
cosmiconfig: 9.0.0(typescript@5.6.3) cosmiconfig: 9.0.0(typescript@5.6.3)
jiti: 2.3.3 jiti: 2.3.3
postcss: 8.4.47 postcss: 8.4.47
semver: 7.6.3 semver: 7.6.3
optionalDependencies: optionalDependencies:
'@rspack/core': 1.0.8
webpack: 5.95.0 webpack: 5.95.0
transitivePeerDependencies: transitivePeerDependencies:
- typescript - typescript
@ -14178,7 +14448,7 @@ snapshots:
dependencies: dependencies:
'@shikijs/core': 1.17.0 '@shikijs/core': 1.17.0
'@shikijs/types': 1.17.0 '@shikijs/types': 1.17.0
'@shikijs/vscode-textmate': 9.2.2 '@shikijs/vscode-textmate': 9.3.0
'@types/hast': 3.0.4 '@types/hast': 3.0.4
shiki@1.20.0: shiki@1.20.0:
@ -14187,7 +14457,7 @@ snapshots:
'@shikijs/engine-javascript': 1.20.0 '@shikijs/engine-javascript': 1.20.0
'@shikijs/engine-oniguruma': 1.20.0 '@shikijs/engine-oniguruma': 1.20.0
'@shikijs/types': 1.20.0 '@shikijs/types': 1.20.0
'@shikijs/vscode-textmate': 9.2.2 '@shikijs/vscode-textmate': 9.3.0
'@types/hast': 3.0.4 '@types/hast': 3.0.4
side-channel@1.0.6: side-channel@1.0.6:
@ -14634,13 +14904,6 @@ snapshots:
node-fetch-native: 1.6.4 node-fetch-native: 1.6.4
pathe: 1.1.2 pathe: 1.1.2
unhead@1.11.6:
dependencies:
'@unhead/dom': 1.11.6
'@unhead/schema': 1.11.6
'@unhead/shared': 1.11.6
hookable: 5.5.3
unhead@1.11.7: unhead@1.11.7:
dependencies: dependencies:
'@unhead/dom': 1.11.7 '@unhead/dom': 1.11.7

View File

@ -15,7 +15,7 @@ import type { NuxtIslandResponse } from '#app'
// TODO: update @nuxt/test-utils // TODO: update @nuxt/test-utils
const $fetch = _$fetch as import('nitro/types').$Fetch<unknown, import('nitro/types').NitroFetchRequest> const $fetch = _$fetch as import('nitro/types').$Fetch<unknown, import('nitro/types').NitroFetchRequest>
const isWebpack = process.env.TEST_BUILDER === 'webpack' const isWebpack = process.env.TEST_BUILDER === 'webpack' || process.env.TEST_BUILDER === 'rspack'
const isTestingAppManifest = process.env.TEST_MANIFEST !== 'manifest-off' const isTestingAppManifest = process.env.TEST_MANIFEST !== 'manifest-off'
await setup({ await setup({

View File

@ -9,7 +9,7 @@ export default defineNuxtConfig({
future: { future: {
typescriptBundlerResolution: process.env.MODULE_RESOLUTION === 'bundler', typescriptBundlerResolution: process.env.MODULE_RESOLUTION === 'bundler',
}, },
builder: process.env.TEST_BUILDER as 'webpack' | 'vite' ?? 'vite', builder: process.env.TEST_BUILDER as 'webpack' | 'rspack' | 'vite' ?? 'vite',
theme: './extends/bar', theme: './extends/bar',
extends: [ extends: [
'./extends/node_modules/foo', './extends/node_modules/foo',

View File

@ -31,7 +31,7 @@ export default defineNuxtConfig({
include: ['keepalive-in-config', 'not-keepalive-in-nuxtpage'], include: ['keepalive-in-config', 'not-keepalive-in-nuxtpage'],
}, },
}, },
builder: process.env.TEST_BUILDER as 'webpack' | 'vite' ?? 'vite', builder: process.env.TEST_BUILDER as 'webpack' | 'rspack' | 'vite' ?? 'vite',
appId: 'nuxt-app-basic', appId: 'nuxt-app-basic',
build: { build: {
transpile: [ transpile: [

View File

@ -5,6 +5,7 @@
"build": "nuxi build" "build": "nuxi build"
}, },
"dependencies": { "dependencies": {
"@nuxt/rspack-builder": "workspace:*",
"@nuxt/webpack-builder": "workspace:*", "@nuxt/webpack-builder": "workspace:*",
"nuxt": "workspace:*" "nuxt": "workspace:*"
}, },

View File

@ -7,5 +7,5 @@ export default defineNuxtConfig({
vue: { vue: {
runtimeCompiler: true, runtimeCompiler: true,
}, },
builder: process.env.TEST_BUILDER as 'webpack' | 'vite' ?? 'vite', builder: process.env.TEST_BUILDER as 'webpack' | 'rspack' | 'vite' ?? 'vite',
}) })

View File

@ -10,7 +10,7 @@ import { expectWithPolling, renderPage } from './utils'
// TODO: update @nuxt/test-utils // TODO: update @nuxt/test-utils
const $fetch = _$fetch as import('nitro/types').$Fetch<unknown, import('nitro/types').NitroFetchRequest> const $fetch = _$fetch as import('nitro/types').$Fetch<unknown, import('nitro/types').NitroFetchRequest>
const isWebpack = process.env.TEST_BUILDER === 'webpack' const isWebpack = process.env.TEST_BUILDER === 'webpack' || process.env.TEST_BUILDER === 'rspack'
// TODO: fix HMR on Windows // TODO: fix HMR on Windows
if (process.env.TEST_ENV !== 'built' && !isWindows) { if (process.env.TEST_ENV !== 'built' && !isWindows) {

View File

@ -4,7 +4,7 @@ import { $fetch, createPage, setup } from '@nuxt/test-utils/e2e'
import { isWindows } from 'std-env' import { isWindows } from 'std-env'
import { expectNoClientErrors } from './utils' import { expectNoClientErrors } from './utils'
const isWebpack = process.env.TEST_BUILDER === 'webpack' const isWebpack = process.env.TEST_BUILDER === 'webpack' || process.env.TEST_BUILDER === 'rspack'
await setup({ await setup({
rootDir: fileURLToPath(new URL('./fixtures/runtime-compiler', import.meta.url)), rootDir: fileURLToPath(new URL('./fixtures/runtime-compiler', import.meta.url)),

View File

@ -4,7 +4,7 @@ import { isWindows } from 'std-env'
import { setup } from '@nuxt/test-utils' import { setup } from '@nuxt/test-utils'
import { renderPage } from './utils' import { renderPage } from './utils'
const isWebpack = process.env.TEST_BUILDER === 'webpack' const isWebpack = process.env.TEST_BUILDER === 'webpack' || process.env.TEST_BUILDER === 'rspack'
await setup({ await setup({
rootDir: fileURLToPath(new URL('./fixtures/suspense', import.meta.url)), rootDir: fileURLToPath(new URL('./fixtures/suspense', import.meta.url)),