diff --git a/.eslintignore b/.eslintignore index b0df07ebb29..df1b16d3c74 100644 --- a/.eslintignore +++ b/.eslintignore @@ -12,3 +12,4 @@ examples diffcases scripts/test/diff.cjs scripts/test/binary-path.cjs +plugin-test diff --git a/.gitignore b/.gitignore index 48f44308128..c279dbb6d52 100644 --- a/.gitignore +++ b/.gitignore @@ -192,7 +192,6 @@ esbuild.cpuprofile # this node_modules is used for tree-shaking snapshot !packages/rspack-test-tools/tests/treeShakingCases/node_modules -!packages/rspack/tests/cssExtract/cases/**/node_modules # Binding artifacts artifacts @@ -223,6 +222,9 @@ justfile !/webpack-test/**/target !/webpack-test/cases/**/node_modules +/plugin-test/css-extract/js +!/plugin-test/css-extract/**/node_modules + /webpack-examples/**/dist smoke-example diff --git a/.prettierignore b/.prettierignore index bbd7e1b5c17..bb7c1d70362 100644 --- a/.prettierignore +++ b/.prettierignore @@ -19,6 +19,8 @@ packages/rspack/tests/cases/parsing/issue-5120-binding/fail.js packages/rspack/tests/diagnostics/module-parse-failed/lexically_name_error/index.js packages/rspack-plugin-mini-css-extract/test/cases/**/* +plugin-test/**/* + benchcases/**/* crates/**/* target/**/* diff --git a/README.md b/README.md index 68293ba29bc..22683b42382 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,7 @@ Thanks to: - The [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) project created by [@jantimon](https://github.com/jantimon), `@rspack/html-plugin` is a fork of [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) to avoid some webpack API usage not supported in Rspack. - The [Turbopack](https://github.com/vercel/turbo) project which inspired the AST path logic of Rspack. - The [react-refresh-webpack-plugin](https://github.com/pmmmwh/react-refresh-webpack-plugin) created by [@pmmmwh](https://github.com/pmmmwh), which inspires implement react refresh. +- The [mini-css-extract-plugin] project created by [@sokra](https://github.com/sokra) which inspired implement css extract plugin. ## License diff --git a/package.json b/package.json index 9fc42798481..0bd72a6b43c 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,8 @@ "test:hot": "pnpm --filter \"@rspack/*\" test:hot", "test:unit": "pnpm --filter \"@rspack/*\" test", "test:e2e": "pnpm --filter \"@rspack-e2e/*\" test", - "test:ci": "cross-env NODE_OPTIONS=--max_old_space_size=8192 pnpm run build:js && pnpm run test:unit && pnpm test:webpack", + "test:ci": "cross-env NODE_OPTIONS=--max_old_space_size=8192 pnpm run build:js && pnpm run test:unit && npm run test:plugin && pnpm test:webpack", + "test:plugin": "pnpm --filter \"plugin-test\" test", "test:webpack": "pnpm --filter \"webpack-test\" test:metric", "api-extractor:local": "pnpm --filter '@rspack/*' api-extractor --local", "api-extractor:ci": "pnpm --filter '@rspack/*' api-extractor:ci" diff --git a/packages/rspack/tests/cssExtract/cases/filename-with-template/webpack.config.js b/packages/rspack/tests/cssExtract/cases/filename-with-template/webpack.config.js deleted file mode 100644 index 5ee8de652f0..00000000000 --- a/packages/rspack/tests/cssExtract/cases/filename-with-template/webpack.config.js +++ /dev/null @@ -1,18 +0,0 @@ -const { CssExtractRspackPlugin } = require("../../../../"); - -module.exports = { - entry: "./index.js", - module: { - rules: [ - { - test: /\.css$/, - use: [CssExtractRspackPlugin.loader, "css-loader"] - } - ] - }, - plugins: [ - new CssExtractRspackPlugin({ - filename: "[name].css" - }) - ] -}; diff --git a/packages/rspack/tests/cssExtract/cases/import/webpack.config.js b/packages/rspack/tests/cssExtract/cases/import/webpack.config.js deleted file mode 100644 index 5ee8de652f0..00000000000 --- a/packages/rspack/tests/cssExtract/cases/import/webpack.config.js +++ /dev/null @@ -1,18 +0,0 @@ -const { CssExtractRspackPlugin } = require("../../../../"); - -module.exports = { - entry: "./index.js", - module: { - rules: [ - { - test: /\.css$/, - use: [CssExtractRspackPlugin.loader, "css-loader"] - } - ] - }, - plugins: [ - new CssExtractRspackPlugin({ - filename: "[name].css" - }) - ] -}; diff --git a/packages/rspack/tests/cssExtract/cases/nested/webpack.config.js b/packages/rspack/tests/cssExtract/cases/nested/webpack.config.js deleted file mode 100644 index 5ee8de652f0..00000000000 --- a/packages/rspack/tests/cssExtract/cases/nested/webpack.config.js +++ /dev/null @@ -1,18 +0,0 @@ -const { CssExtractRspackPlugin } = require("../../../../"); - -module.exports = { - entry: "./index.js", - module: { - rules: [ - { - test: /\.css$/, - use: [CssExtractRspackPlugin.loader, "css-loader"] - } - ] - }, - plugins: [ - new CssExtractRspackPlugin({ - filename: "[name].css" - }) - ] -}; diff --git a/packages/rspack/tests/cssExtract/cases/shared-import/webpack.config.js b/packages/rspack/tests/cssExtract/cases/shared-import/webpack.config.js deleted file mode 100644 index 5ee8de652f0..00000000000 --- a/packages/rspack/tests/cssExtract/cases/shared-import/webpack.config.js +++ /dev/null @@ -1,18 +0,0 @@ -const { CssExtractRspackPlugin } = require("../../../../"); - -module.exports = { - entry: "./index.js", - module: { - rules: [ - { - test: /\.css$/, - use: [CssExtractRspackPlugin.loader, "css-loader"] - } - ] - }, - plugins: [ - new CssExtractRspackPlugin({ - filename: "[name].css" - }) - ] -}; diff --git a/packages/rspack/tests/cssExtract/cases/simple-async/webpack.config.js b/packages/rspack/tests/cssExtract/cases/simple-async/webpack.config.js deleted file mode 100644 index 5ee8de652f0..00000000000 --- a/packages/rspack/tests/cssExtract/cases/simple-async/webpack.config.js +++ /dev/null @@ -1,18 +0,0 @@ -const { CssExtractRspackPlugin } = require("../../../../"); - -module.exports = { - entry: "./index.js", - module: { - rules: [ - { - test: /\.css$/, - use: [CssExtractRspackPlugin.loader, "css-loader"] - } - ] - }, - plugins: [ - new CssExtractRspackPlugin({ - filename: "[name].css" - }) - ] -}; diff --git a/packages/rspack/tests/cssExtract/cases/simple-multiple/webpack.config.js b/packages/rspack/tests/cssExtract/cases/simple-multiple/webpack.config.js deleted file mode 100644 index 5ee8de652f0..00000000000 --- a/packages/rspack/tests/cssExtract/cases/simple-multiple/webpack.config.js +++ /dev/null @@ -1,18 +0,0 @@ -const { CssExtractRspackPlugin } = require("../../../../"); - -module.exports = { - entry: "./index.js", - module: { - rules: [ - { - test: /\.css$/, - use: [CssExtractRspackPlugin.loader, "css-loader"] - } - ] - }, - plugins: [ - new CssExtractRspackPlugin({ - filename: "[name].css" - }) - ] -}; diff --git a/packages/rspack/tests/cssExtract/cases/simple/webpack.config.js b/packages/rspack/tests/cssExtract/cases/simple/webpack.config.js deleted file mode 100644 index 5ee8de652f0..00000000000 --- a/packages/rspack/tests/cssExtract/cases/simple/webpack.config.js +++ /dev/null @@ -1,18 +0,0 @@ -const { CssExtractRspackPlugin } = require("../../../../"); - -module.exports = { - entry: "./index.js", - module: { - rules: [ - { - test: /\.css$/, - use: [CssExtractRspackPlugin.loader, "css-loader"] - } - ] - }, - plugins: [ - new CssExtractRspackPlugin({ - filename: "[name].css" - }) - ] -}; diff --git a/plugin-test/README.md b/plugin-test/README.md new file mode 100644 index 00000000000..2d40f7d7397 --- /dev/null +++ b/plugin-test/README.md @@ -0,0 +1,8 @@ +>**Note** +> This package is heavily based on [mini-css-extract-plugin/test](https://github.com/webpack-contrib/mini-css-extract-plugin/tree/master/test) + +## Credits + +Thanks to: + +* The [mini-css-extract-plugin] project created by [@sokra](https://github.com/sokra) diff --git a/packages/rspack/tests/cssExtract/HMR.test.js b/plugin-test/css-extract/HMR.test.js similarity index 98% rename from packages/rspack/tests/cssExtract/HMR.test.js rename to plugin-test/css-extract/HMR.test.js index 8c039e0dc0a..1d0d21d6bf0 100644 --- a/packages/rspack/tests/cssExtract/HMR.test.js +++ b/plugin-test/css-extract/HMR.test.js @@ -4,7 +4,7 @@ /* eslint-env browser */ /* eslint-disable no-console */ -const hotModuleReplacement = require("../../dist/builtin-plugin/css-extract/hmr/hotModuleReplacement"); +const hotModuleReplacement = require("../../packages/rspack/dist/builtin-plugin/css-extract/hmr/hotModuleReplacement"); function getLoadEvent() { const event = document.createEvent("Event"); @@ -26,7 +26,7 @@ describe("HMR", () => { let consoleMock = null; beforeEach(() => { - consoleMock = jest.spyOn(console, "log").mockImplementation(() => () => {}); + consoleMock = jest.spyOn(console, "log").mockImplementation(() => () => { }); jest.spyOn(Date, "now").mockImplementation(() => 1479427200000); diff --git a/plugin-test/css-extract/README.md b/plugin-test/css-extract/README.md new file mode 100644 index 00000000000..9a84af540de --- /dev/null +++ b/plugin-test/css-extract/README.md @@ -0,0 +1,9 @@ +/** + * The test code is modified based on + * https://github.com/webpack-contrib/mini-css-extract-plugin/tree/master/test + * + * MIT Licensed + * Author Tobias Koppers @sokra + * Copyright JS Foundation and other contributors + * https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/LICENSE + */ \ No newline at end of file diff --git a/packages/rspack/tests/cssExtract/TestCache.test.js b/plugin-test/css-extract/TestCache.test.js similarity index 99% rename from packages/rspack/tests/cssExtract/TestCache.test.js rename to plugin-test/css-extract/TestCache.test.js index 83598d18fc0..5e7e748894f 100644 --- a/packages/rspack/tests/cssExtract/TestCache.test.js +++ b/plugin-test/css-extract/TestCache.test.js @@ -3,7 +3,7 @@ */ const path = require("path"); -const webpack = require("../../"); +const webpack = require("@rspack/core"); const del = require("del"); describe("TestCache", () => { diff --git a/packages/rspack/tests/cssExtract/TestCases.test.js b/plugin-test/css-extract/TestCases.test.js similarity index 92% rename from packages/rspack/tests/cssExtract/TestCases.test.js rename to plugin-test/css-extract/TestCases.test.js index c077f49596b..ef48e0f041f 100644 --- a/packages/rspack/tests/cssExtract/TestCases.test.js +++ b/plugin-test/css-extract/TestCases.test.js @@ -4,11 +4,11 @@ const fs = require("fs"); const path = require("path"); -const webpack = require("../../"); +const webpack = require("@rspack/core"); const yn = require("./helpers/yn"); const { CssExtractRspackPlugin } = webpack; -const UPDATE_TEST = process.env.CSS_CASE_UPDATE; +const UPDATE_TEST = global.updateSnapshot; function clearDirectory(dirPath) { let files; @@ -92,7 +92,7 @@ function compareDirectory(actual, expected) { if (UPDATE_TEST) { fs.writeFileSync(path.resolve(expected, file), actualContent); } else { - expect(actualContent).toEqual(content); + expect(actualContent.replace(/\r\n/g, "\n").trim()).toEqual(content.replace(/\r\n/g, "\n").trim()); } } } @@ -109,7 +109,7 @@ describe("TestCases", () => { // eslint-disable-next-line global-require, import/no-dynamic-require if (fs.existsSync(filterPath) && !require(filterPath)()) { describe.skip(test, () => { - it("filtered", () => {}); + it("filtered", () => { }); }); return false; @@ -137,20 +137,9 @@ describe("TestCases", () => { )); const webpackConfig = Array.isArray(config) ? config.map(config => { - return { - ...config, - optimization: { chunkIds: "named", ...config.optimization }, - experiments: { - css: false, - rspackFuture: { - newTreeshaking: true - }, - ...config.experiments - } - }; - }) - : { + return { ...config, + optimization: { chunkIds: "named", ...config.optimization }, experiments: { css: false, rspackFuture: { @@ -158,7 +147,18 @@ describe("TestCases", () => { }, ...config.experiments } - }; + }; + }) + : { + ...config, + experiments: { + css: false, + rspackFuture: { + newTreeshaking: true + }, + ...config.experiments + } + }; const { context } = webpackConfig; for (const config of [].concat(webpackConfig)) { @@ -249,8 +249,7 @@ describe("TestCases", () => { const expectedDirectory = path.resolve(directoryForCase, "expected"); const expectedDirectoryByVersion = path.join( expectedDirectory, - `webpack-${webpack.version[0]}${ - yn(process.env.OLD_API) ? "" : "-importModule" + `webpack-${webpack.version[0]}${yn(process.env.OLD_API) ? "" : "-importModule" }` ); @@ -267,7 +266,6 @@ describe("TestCases", () => { const matchAll = res.match( /__webpack_require__\.h = function \(\) {\n.*return ("[\d\w].*");\n.*};/i ); - console.log(matchAll[1]); const replacer = new Array(matchAll[1].length); res = res.replace( @@ -301,7 +299,6 @@ describe("TestCases", () => { }); // eslint-disable-next-line global-require, import/no-dynamic-require const expectedWarnings = require(warningsFile); - console.log(actualWarnings); expect( actualWarnings .trim() diff --git a/packages/rspack/tests/cssExtract/TestMemoryFS.test.js b/plugin-test/css-extract/TestMemoryFS.test.js similarity index 96% rename from packages/rspack/tests/cssExtract/TestMemoryFS.test.js rename to plugin-test/css-extract/TestMemoryFS.test.js index 68493324053..073c1218156 100644 --- a/packages/rspack/tests/cssExtract/TestMemoryFS.test.js +++ b/plugin-test/css-extract/TestMemoryFS.test.js @@ -1,6 +1,6 @@ const path = require("path"); const { createFsFromVolume, Volume } = require("memfs"); -const webpack = require("../../"); +const webpack = require("@rspack/core"); const assetsNames = assets => assets.map(asset => asset.name); diff --git a/packages/rspack/tests/cssExtract/__snapshots__/HMR.test.js.snap b/plugin-test/css-extract/__snapshots__/HMR.test.js.snap similarity index 100% rename from packages/rspack/tests/cssExtract/__snapshots__/HMR.test.js.snap rename to plugin-test/css-extract/__snapshots__/HMR.test.js.snap diff --git a/packages/rspack/tests/cssExtract/__snapshots__/attributesOption.test.js.snap b/plugin-test/css-extract/__snapshots__/attributesOption.test.js.snap similarity index 100% rename from packages/rspack/tests/cssExtract/__snapshots__/attributesOption.test.js.snap rename to plugin-test/css-extract/__snapshots__/attributesOption.test.js.snap diff --git a/packages/rspack/tests/cssExtract/__snapshots__/emitOption.test.js.snap b/plugin-test/css-extract/__snapshots__/emitOption.test.js.snap similarity index 100% rename from packages/rspack/tests/cssExtract/__snapshots__/emitOption.test.js.snap rename to plugin-test/css-extract/__snapshots__/emitOption.test.js.snap diff --git a/packages/rspack/tests/cssExtract/__snapshots__/insertOption.test.js.snap b/plugin-test/css-extract/__snapshots__/insertOption.test.js.snap similarity index 100% rename from packages/rspack/tests/cssExtract/__snapshots__/insertOption.test.js.snap rename to plugin-test/css-extract/__snapshots__/insertOption.test.js.snap diff --git a/packages/rspack/tests/cssExtract/__snapshots__/linkTagOption.test.js.snap b/plugin-test/css-extract/__snapshots__/linkTagOption.test.js.snap similarity index 100% rename from packages/rspack/tests/cssExtract/__snapshots__/linkTagOption.test.js.snap rename to plugin-test/css-extract/__snapshots__/linkTagOption.test.js.snap diff --git a/packages/rspack/tests/cssExtract/__snapshots__/runtimeOption.test.js.snap b/plugin-test/css-extract/__snapshots__/runtimeOption.test.js.snap similarity index 100% rename from packages/rspack/tests/cssExtract/__snapshots__/runtimeOption.test.js.snap rename to plugin-test/css-extract/__snapshots__/runtimeOption.test.js.snap diff --git a/packages/rspack/tests/cssExtract/__snapshots__/validate-loader-options.test.js.snap b/plugin-test/css-extract/__snapshots__/validate-loader-options.test.js.snap similarity index 100% rename from packages/rspack/tests/cssExtract/__snapshots__/validate-loader-options.test.js.snap rename to plugin-test/css-extract/__snapshots__/validate-loader-options.test.js.snap diff --git a/packages/rspack/tests/cssExtract/__snapshots__/validate-plugin-options.test.js.snap b/plugin-test/css-extract/__snapshots__/validate-plugin-options.test.js.snap similarity index 100% rename from packages/rspack/tests/cssExtract/__snapshots__/validate-plugin-options.test.js.snap rename to plugin-test/css-extract/__snapshots__/validate-plugin-options.test.js.snap diff --git a/packages/rspack/tests/cssExtract/attributesOption.test.js b/plugin-test/css-extract/attributesOption.test.js similarity index 98% rename from packages/rspack/tests/cssExtract/attributesOption.test.js rename to plugin-test/css-extract/attributesOption.test.js index f2e092d961f..263e34da039 100644 --- a/packages/rspack/tests/cssExtract/attributesOption.test.js +++ b/plugin-test/css-extract/attributesOption.test.js @@ -1,7 +1,7 @@ /* eslint-env browser */ const path = require("path"); -const { CssExtractRspackPlugin: MiniCssExtractPlugin } = require("../../dist"); +const { CssExtractRspackPlugin: MiniCssExtractPlugin } = require("@rspack/core"); const { compile, diff --git a/packages/rspack/tests/cssExtract/cases/asset-modules/expected/main.css b/plugin-test/css-extract/cases/asset-modules/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/asset-modules/expected/main.css rename to plugin-test/css-extract/cases/asset-modules/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/asset-modules/index.js b/plugin-test/css-extract/cases/asset-modules/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/asset-modules/index.js rename to plugin-test/css-extract/cases/asset-modules/index.js diff --git a/packages/rspack/tests/cssExtract/cases/asset-modules/react.svg b/plugin-test/css-extract/cases/asset-modules/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/asset-modules/react.svg rename to plugin-test/css-extract/cases/asset-modules/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/asset-modules/style.css b/plugin-test/css-extract/cases/asset-modules/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/asset-modules/style.css rename to plugin-test/css-extract/cases/asset-modules/style.css diff --git a/packages/rspack/tests/cssExtract/cases/asset-modules/webpack.config.js b/plugin-test/css-extract/cases/asset-modules/webpack.config.js similarity index 86% rename from packages/rspack/tests/cssExtract/cases/asset-modules/webpack.config.js rename to plugin-test/css-extract/cases/asset-modules/webpack.config.js index 22a4d211076..885b3c52b98 100644 --- a/packages/rspack/tests/cssExtract/cases/asset-modules/webpack.config.js +++ b/plugin-test/css-extract/cases/asset-modules/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/at-charset/a.css b/plugin-test/css-extract/cases/at-charset/a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-charset/a.css rename to plugin-test/css-extract/cases/at-charset/a.css diff --git a/packages/rspack/tests/cssExtract/cases/at-charset/aa.css b/plugin-test/css-extract/cases/at-charset/aa.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-charset/aa.css rename to plugin-test/css-extract/cases/at-charset/aa.css diff --git a/packages/rspack/tests/cssExtract/cases/at-charset/ab.css b/plugin-test/css-extract/cases/at-charset/ab.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-charset/ab.css rename to plugin-test/css-extract/cases/at-charset/ab.css diff --git a/packages/rspack/tests/cssExtract/cases/at-charset/ac.css b/plugin-test/css-extract/cases/at-charset/ac.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-charset/ac.css rename to plugin-test/css-extract/cases/at-charset/ac.css diff --git a/packages/rspack/tests/cssExtract/cases/at-charset/ad.css b/plugin-test/css-extract/cases/at-charset/ad.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-charset/ad.css rename to plugin-test/css-extract/cases/at-charset/ad.css diff --git a/packages/rspack/tests/cssExtract/cases/at-charset/ae.css b/plugin-test/css-extract/cases/at-charset/ae.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-charset/ae.css rename to plugin-test/css-extract/cases/at-charset/ae.css diff --git a/packages/rspack/tests/cssExtract/cases/at-charset/b.css b/plugin-test/css-extract/cases/at-charset/b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-charset/b.css rename to plugin-test/css-extract/cases/at-charset/b.css diff --git a/packages/rspack/tests/cssExtract/cases/at-charset/ba.css b/plugin-test/css-extract/cases/at-charset/ba.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-charset/ba.css rename to plugin-test/css-extract/cases/at-charset/ba.css diff --git a/packages/rspack/tests/cssExtract/cases/at-charset/bb.css b/plugin-test/css-extract/cases/at-charset/bb.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-charset/bb.css rename to plugin-test/css-extract/cases/at-charset/bb.css diff --git a/packages/rspack/tests/cssExtract/cases/at-charset/expected/main.css b/plugin-test/css-extract/cases/at-charset/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-charset/expected/main.css rename to plugin-test/css-extract/cases/at-charset/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/at-charset/index.js b/plugin-test/css-extract/cases/at-charset/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-charset/index.js rename to plugin-test/css-extract/cases/at-charset/index.js diff --git a/packages/rspack/tests/cssExtract/cases/at-import-layer/webpack.config.js b/plugin-test/css-extract/cases/at-charset/webpack.config.js similarity index 79% rename from packages/rspack/tests/cssExtract/cases/at-import-layer/webpack.config.js rename to plugin-test/css-extract/cases/at-charset/webpack.config.js index 5ee8de652f0..bc1745072da 100644 --- a/packages/rspack/tests/cssExtract/cases/at-import-layer/webpack.config.js +++ b/plugin-test/css-extract/cases/at-charset/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/at-import-in-the-entry/a.css b/plugin-test/css-extract/cases/at-import-in-the-entry/a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-in-the-entry/a.css rename to plugin-test/css-extract/cases/at-import-in-the-entry/a.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import-in-the-entry/b.css b/plugin-test/css-extract/cases/at-import-in-the-entry/b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-in-the-entry/b.css rename to plugin-test/css-extract/cases/at-import-in-the-entry/b.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import-in-the-entry/expected/main.css b/plugin-test/css-extract/cases/at-import-in-the-entry/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-in-the-entry/expected/main.css rename to plugin-test/css-extract/cases/at-import-in-the-entry/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import-in-the-entry/test.filter.js b/plugin-test/css-extract/cases/at-import-in-the-entry/test.filter.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-in-the-entry/test.filter.js rename to plugin-test/css-extract/cases/at-import-in-the-entry/test.filter.js diff --git a/packages/rspack/tests/cssExtract/cases/at-import-in-the-entry/webpack.config.js b/plugin-test/css-extract/cases/at-import-in-the-entry/webpack.config.js similarity index 83% rename from packages/rspack/tests/cssExtract/cases/at-import-in-the-entry/webpack.config.js rename to plugin-test/css-extract/cases/at-import-in-the-entry/webpack.config.js index 9d030173d09..3641a7f5fc1 100644 --- a/packages/rspack/tests/cssExtract/cases/at-import-in-the-entry/webpack.config.js +++ b/plugin-test/css-extract/cases/at-import-in-the-entry/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { mode: "development", diff --git a/packages/rspack/tests/cssExtract/cases/at-import-in-the-middle/a.css b/plugin-test/css-extract/cases/at-import-in-the-middle/a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-in-the-middle/a.css rename to plugin-test/css-extract/cases/at-import-in-the-middle/a.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import-in-the-middle/b.css b/plugin-test/css-extract/cases/at-import-in-the-middle/b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-in-the-middle/b.css rename to plugin-test/css-extract/cases/at-import-in-the-middle/b.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import-in-the-middle/c.css b/plugin-test/css-extract/cases/at-import-in-the-middle/c.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-in-the-middle/c.css rename to plugin-test/css-extract/cases/at-import-in-the-middle/c.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import-in-the-middle/expected/main.css b/plugin-test/css-extract/cases/at-import-in-the-middle/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-in-the-middle/expected/main.css rename to plugin-test/css-extract/cases/at-import-in-the-middle/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import-in-the-middle/index.css b/plugin-test/css-extract/cases/at-import-in-the-middle/index.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-in-the-middle/index.css rename to plugin-test/css-extract/cases/at-import-in-the-middle/index.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import-in-the-middle/webpack.config.js b/plugin-test/css-extract/cases/at-import-in-the-middle/webpack.config.js similarity index 79% rename from packages/rspack/tests/cssExtract/cases/at-import-in-the-middle/webpack.config.js rename to plugin-test/css-extract/cases/at-import-in-the-middle/webpack.config.js index b62a2b49b92..d73166adb7d 100644 --- a/packages/rspack/tests/cssExtract/cases/at-import-in-the-middle/webpack.config.js +++ b/plugin-test/css-extract/cases/at-import-in-the-middle/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.css", diff --git a/packages/rspack/tests/cssExtract/cases/at-import-layer/expected/main.css b/plugin-test/css-extract/cases/at-import-layer/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-layer/expected/main.css rename to plugin-test/css-extract/cases/at-import-layer/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import-layer/import-with-layer-and-supports-and-media.css b/plugin-test/css-extract/cases/at-import-layer/import-with-layer-and-supports-and-media.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-layer/import-with-layer-and-supports-and-media.css rename to plugin-test/css-extract/cases/at-import-layer/import-with-layer-and-supports-and-media.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import-layer/import-with-layer.css b/plugin-test/css-extract/cases/at-import-layer/import-with-layer.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-layer/import-with-layer.css rename to plugin-test/css-extract/cases/at-import-layer/import-with-layer.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import-layer/index.js b/plugin-test/css-extract/cases/at-import-layer/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-layer/index.js rename to plugin-test/css-extract/cases/at-import-layer/index.js diff --git a/packages/rspack/tests/cssExtract/cases/at-import-layer/style.css b/plugin-test/css-extract/cases/at-import-layer/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-layer/style.css rename to plugin-test/css-extract/cases/at-import-layer/style.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import-layer/test.css b/plugin-test/css-extract/cases/at-import-layer/test.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-layer/test.css rename to plugin-test/css-extract/cases/at-import-layer/test.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import-layer/test.filter.js b/plugin-test/css-extract/cases/at-import-layer/test.filter.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-layer/test.filter.js rename to plugin-test/css-extract/cases/at-import-layer/test.filter.js diff --git a/packages/rspack/tests/cssExtract/cases/at-import-layer/unnamed-layer.css b/plugin-test/css-extract/cases/at-import-layer/unnamed-layer.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-layer/unnamed-layer.css rename to plugin-test/css-extract/cases/at-import-layer/unnamed-layer.css diff --git a/packages/rspack/tests/cssExtract/cases/at-charset/webpack.config.js b/plugin-test/css-extract/cases/at-import-layer/webpack.config.js similarity index 79% rename from packages/rspack/tests/cssExtract/cases/at-charset/webpack.config.js rename to plugin-test/css-extract/cases/at-import-layer/webpack.config.js index 5ee8de652f0..bc1745072da 100644 --- a/packages/rspack/tests/cssExtract/cases/at-charset/webpack.config.js +++ b/plugin-test/css-extract/cases/at-import-layer/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/at-import-layer/zzz.css b/plugin-test/css-extract/cases/at-import-layer/zzz.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-layer/zzz.css rename to plugin-test/css-extract/cases/at-import-layer/zzz.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import-supports/expected/main.css b/plugin-test/css-extract/cases/at-import-supports/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-supports/expected/main.css rename to plugin-test/css-extract/cases/at-import-supports/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import-supports/import-with-supports.css b/plugin-test/css-extract/cases/at-import-supports/import-with-supports.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-supports/import-with-supports.css rename to plugin-test/css-extract/cases/at-import-supports/import-with-supports.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import-supports/index.js b/plugin-test/css-extract/cases/at-import-supports/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-supports/index.js rename to plugin-test/css-extract/cases/at-import-supports/index.js diff --git a/packages/rspack/tests/cssExtract/cases/at-import-supports/style.css b/plugin-test/css-extract/cases/at-import-supports/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-supports/style.css rename to plugin-test/css-extract/cases/at-import-supports/style.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import-supports/test.css b/plugin-test/css-extract/cases/at-import-supports/test.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import-supports/test.css rename to plugin-test/css-extract/cases/at-import-supports/test.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import-supports/webpack.config.js b/plugin-test/css-extract/cases/at-import-supports/webpack.config.js similarity index 79% rename from packages/rspack/tests/cssExtract/cases/at-import-supports/webpack.config.js rename to plugin-test/css-extract/cases/at-import-supports/webpack.config.js index 5ee8de652f0..bc1745072da 100644 --- a/packages/rspack/tests/cssExtract/cases/at-import-supports/webpack.config.js +++ b/plugin-test/css-extract/cases/at-import-supports/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/at-import/a.css b/plugin-test/css-extract/cases/at-import/a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import/a.css rename to plugin-test/css-extract/cases/at-import/a.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import/aa.css b/plugin-test/css-extract/cases/at-import/aa.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import/aa.css rename to plugin-test/css-extract/cases/at-import/aa.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import/ab.css b/plugin-test/css-extract/cases/at-import/ab.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import/ab.css rename to plugin-test/css-extract/cases/at-import/ab.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import/ac.css b/plugin-test/css-extract/cases/at-import/ac.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import/ac.css rename to plugin-test/css-extract/cases/at-import/ac.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import/ad.css b/plugin-test/css-extract/cases/at-import/ad.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import/ad.css rename to plugin-test/css-extract/cases/at-import/ad.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import/ae.css b/plugin-test/css-extract/cases/at-import/ae.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import/ae.css rename to plugin-test/css-extract/cases/at-import/ae.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import/b.css b/plugin-test/css-extract/cases/at-import/b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import/b.css rename to plugin-test/css-extract/cases/at-import/b.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import/ba.css b/plugin-test/css-extract/cases/at-import/ba.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import/ba.css rename to plugin-test/css-extract/cases/at-import/ba.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import/bb.css b/plugin-test/css-extract/cases/at-import/bb.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import/bb.css rename to plugin-test/css-extract/cases/at-import/bb.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import/expected/main.css b/plugin-test/css-extract/cases/at-import/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import/expected/main.css rename to plugin-test/css-extract/cases/at-import/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/at-import/index.js b/plugin-test/css-extract/cases/at-import/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-import/index.js rename to plugin-test/css-extract/cases/at-import/index.js diff --git a/packages/rspack/tests/cssExtract/cases/at-import/webpack.config.js b/plugin-test/css-extract/cases/at-import/webpack.config.js similarity index 79% rename from packages/rspack/tests/cssExtract/cases/at-import/webpack.config.js rename to plugin-test/css-extract/cases/at-import/webpack.config.js index 5ee8de652f0..bc1745072da 100644 --- a/packages/rspack/tests/cssExtract/cases/at-import/webpack.config.js +++ b/plugin-test/css-extract/cases/at-import/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/at-media/a.css b/plugin-test/css-extract/cases/at-media/a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-media/a.css rename to plugin-test/css-extract/cases/at-media/a.css diff --git a/packages/rspack/tests/cssExtract/cases/at-media/b.css b/plugin-test/css-extract/cases/at-media/b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-media/b.css rename to plugin-test/css-extract/cases/at-media/b.css diff --git a/packages/rspack/tests/cssExtract/cases/at-media/c.css b/plugin-test/css-extract/cases/at-media/c.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-media/c.css rename to plugin-test/css-extract/cases/at-media/c.css diff --git a/packages/rspack/tests/cssExtract/cases/at-media/d.css b/plugin-test/css-extract/cases/at-media/d.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-media/d.css rename to plugin-test/css-extract/cases/at-media/d.css diff --git a/packages/rspack/tests/cssExtract/cases/at-media/e.css b/plugin-test/css-extract/cases/at-media/e.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-media/e.css rename to plugin-test/css-extract/cases/at-media/e.css diff --git a/packages/rspack/tests/cssExtract/cases/at-media/expected/main.css b/plugin-test/css-extract/cases/at-media/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-media/expected/main.css rename to plugin-test/css-extract/cases/at-media/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/at-media/f.css b/plugin-test/css-extract/cases/at-media/f.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-media/f.css rename to plugin-test/css-extract/cases/at-media/f.css diff --git a/packages/rspack/tests/cssExtract/cases/at-media/g.css b/plugin-test/css-extract/cases/at-media/g.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-media/g.css rename to plugin-test/css-extract/cases/at-media/g.css diff --git a/packages/rspack/tests/cssExtract/cases/at-media/index.js b/plugin-test/css-extract/cases/at-media/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-media/index.js rename to plugin-test/css-extract/cases/at-media/index.js diff --git a/packages/rspack/tests/cssExtract/cases/at-media/style.css b/plugin-test/css-extract/cases/at-media/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/at-media/style.css rename to plugin-test/css-extract/cases/at-media/style.css diff --git a/packages/rspack/tests/cssExtract/cases/at-media/webpack.config.js b/plugin-test/css-extract/cases/at-media/webpack.config.js similarity index 83% rename from packages/rspack/tests/cssExtract/cases/at-media/webpack.config.js rename to plugin-test/css-extract/cases/at-media/webpack.config.js index f733a95866f..e5e5689bbd4 100644 --- a/packages/rspack/tests/cssExtract/cases/at-media/webpack.config.js +++ b/plugin-test/css-extract/cases/at-media/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/auxiliary-assets/expected/auxiliaryAssets-815babffe97b00a1f30b.woff2 b/plugin-test/css-extract/cases/auxiliary-assets/expected/auxiliaryAssets-815babffe97b00a1f30b.woff2 similarity index 100% rename from packages/rspack/tests/cssExtract/cases/auxiliary-assets/expected/auxiliaryAssets-815babffe97b00a1f30b.woff2 rename to plugin-test/css-extract/cases/auxiliary-assets/expected/auxiliaryAssets-815babffe97b00a1f30b.woff2 diff --git a/packages/rspack/tests/cssExtract/cases/auxiliary-assets/expected/auxiliaryAssets-a0de923c946d4ccb38b0.ttf b/plugin-test/css-extract/cases/auxiliary-assets/expected/auxiliaryAssets-a0de923c946d4ccb38b0.ttf similarity index 100% rename from packages/rspack/tests/cssExtract/cases/auxiliary-assets/expected/auxiliaryAssets-a0de923c946d4ccb38b0.ttf rename to plugin-test/css-extract/cases/auxiliary-assets/expected/auxiliaryAssets-a0de923c946d4ccb38b0.ttf diff --git a/packages/rspack/tests/cssExtract/cases/auxiliary-assets/expected/auxiliaryAssets-d4c409dfe110747b1763.woff b/plugin-test/css-extract/cases/auxiliary-assets/expected/auxiliaryAssets-d4c409dfe110747b1763.woff similarity index 100% rename from packages/rspack/tests/cssExtract/cases/auxiliary-assets/expected/auxiliaryAssets-d4c409dfe110747b1763.woff rename to plugin-test/css-extract/cases/auxiliary-assets/expected/auxiliaryAssets-d4c409dfe110747b1763.woff diff --git a/packages/rspack/tests/cssExtract/cases/auxiliary-assets/fonts.css b/plugin-test/css-extract/cases/auxiliary-assets/fonts.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/auxiliary-assets/fonts.css rename to plugin-test/css-extract/cases/auxiliary-assets/fonts.css diff --git a/packages/rspack/tests/cssExtract/cases/auxiliary-assets/fonts/roboto-v18-latin-300.ttf b/plugin-test/css-extract/cases/auxiliary-assets/fonts/roboto-v18-latin-300.ttf similarity index 100% rename from packages/rspack/tests/cssExtract/cases/auxiliary-assets/fonts/roboto-v18-latin-300.ttf rename to plugin-test/css-extract/cases/auxiliary-assets/fonts/roboto-v18-latin-300.ttf diff --git a/packages/rspack/tests/cssExtract/cases/auxiliary-assets/fonts/roboto-v18-latin-300.woff b/plugin-test/css-extract/cases/auxiliary-assets/fonts/roboto-v18-latin-300.woff similarity index 100% rename from packages/rspack/tests/cssExtract/cases/auxiliary-assets/fonts/roboto-v18-latin-300.woff rename to plugin-test/css-extract/cases/auxiliary-assets/fonts/roboto-v18-latin-300.woff diff --git a/packages/rspack/tests/cssExtract/cases/auxiliary-assets/fonts/roboto-v18-latin-300.woff2 b/plugin-test/css-extract/cases/auxiliary-assets/fonts/roboto-v18-latin-300.woff2 similarity index 100% rename from packages/rspack/tests/cssExtract/cases/auxiliary-assets/fonts/roboto-v18-latin-300.woff2 rename to plugin-test/css-extract/cases/auxiliary-assets/fonts/roboto-v18-latin-300.woff2 diff --git a/packages/rspack/tests/cssExtract/cases/auxiliary-assets/index.js b/plugin-test/css-extract/cases/auxiliary-assets/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/auxiliary-assets/index.js rename to plugin-test/css-extract/cases/auxiliary-assets/index.js diff --git a/packages/rspack/tests/cssExtract/cases/auxiliary-assets/test.filter.js b/plugin-test/css-extract/cases/auxiliary-assets/test.filter.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/auxiliary-assets/test.filter.js rename to plugin-test/css-extract/cases/auxiliary-assets/test.filter.js diff --git a/packages/rspack/tests/cssExtract/cases/auxiliary-assets/webpack.config.js b/plugin-test/css-extract/cases/auxiliary-assets/webpack.config.js similarity index 94% rename from packages/rspack/tests/cssExtract/cases/auxiliary-assets/webpack.config.js rename to plugin-test/css-extract/cases/auxiliary-assets/webpack.config.js index 37c49a5c6bb..ecd9b77f824 100644 --- a/packages/rspack/tests/cssExtract/cases/auxiliary-assets/webpack.config.js +++ b/plugin-test/css-extract/cases/auxiliary-assets/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); class AssetsPlugin { // eslint-disable-next-line class-methods-use-this diff --git a/packages/rspack/tests/cssExtract/cases/base-uri-in-entry/expected/webpack-5-importModule/asset/roboto-v18-latin-300.ttf b/plugin-test/css-extract/cases/base-uri-in-entry/expected/webpack-5-importModule/asset/roboto-v18-latin-300.ttf similarity index 100% rename from packages/rspack/tests/cssExtract/cases/base-uri-in-entry/expected/webpack-5-importModule/asset/roboto-v18-latin-300.ttf rename to plugin-test/css-extract/cases/base-uri-in-entry/expected/webpack-5-importModule/asset/roboto-v18-latin-300.ttf diff --git a/packages/rspack/tests/cssExtract/cases/base-uri-in-entry/expected/webpack-5-importModule/index.css b/plugin-test/css-extract/cases/base-uri-in-entry/expected/webpack-5-importModule/index.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/base-uri-in-entry/expected/webpack-5-importModule/index.css rename to plugin-test/css-extract/cases/base-uri-in-entry/expected/webpack-5-importModule/index.css diff --git a/packages/rspack/tests/cssExtract/cases/base-uri-in-entry/expected/webpack-5/asset/roboto-v18-latin-300.ttf b/plugin-test/css-extract/cases/base-uri-in-entry/expected/webpack-5/asset/roboto-v18-latin-300.ttf similarity index 100% rename from packages/rspack/tests/cssExtract/cases/base-uri-in-entry/expected/webpack-5/asset/roboto-v18-latin-300.ttf rename to plugin-test/css-extract/cases/base-uri-in-entry/expected/webpack-5/asset/roboto-v18-latin-300.ttf diff --git a/packages/rspack/tests/cssExtract/cases/base-uri-in-entry/expected/webpack-5/index.css b/plugin-test/css-extract/cases/base-uri-in-entry/expected/webpack-5/index.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/base-uri-in-entry/expected/webpack-5/index.css rename to plugin-test/css-extract/cases/base-uri-in-entry/expected/webpack-5/index.css diff --git a/packages/rspack/tests/cssExtract/cases/base-uri-in-entry/fonts/roboto-v18-latin-300.ttf b/plugin-test/css-extract/cases/base-uri-in-entry/fonts/roboto-v18-latin-300.ttf similarity index 100% rename from packages/rspack/tests/cssExtract/cases/base-uri-in-entry/fonts/roboto-v18-latin-300.ttf rename to plugin-test/css-extract/cases/base-uri-in-entry/fonts/roboto-v18-latin-300.ttf diff --git a/packages/rspack/tests/cssExtract/cases/base-uri-in-entry/index.js b/plugin-test/css-extract/cases/base-uri-in-entry/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/base-uri-in-entry/index.js rename to plugin-test/css-extract/cases/base-uri-in-entry/index.js diff --git a/packages/rspack/tests/cssExtract/cases/base-uri-in-entry/main.css b/plugin-test/css-extract/cases/base-uri-in-entry/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/base-uri-in-entry/main.css rename to plugin-test/css-extract/cases/base-uri-in-entry/main.css diff --git a/packages/rspack/tests/cssExtract/cases/base-uri-in-entry/webpack.config.js b/plugin-test/css-extract/cases/base-uri-in-entry/webpack.config.js similarity index 92% rename from packages/rspack/tests/cssExtract/cases/base-uri-in-entry/webpack.config.js rename to plugin-test/css-extract/cases/base-uri-in-entry/webpack.config.js index efd36440362..f04dcd08536 100644 --- a/packages/rspack/tests/cssExtract/cases/base-uri-in-entry/webpack.config.js +++ b/plugin-test/css-extract/cases/base-uri-in-entry/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); /** * @type {import('@rspack/core').Configuration} diff --git a/packages/rspack/tests/cssExtract/cases/base-uri/expected/asset/roboto-v18-latin-300.ttf b/plugin-test/css-extract/cases/base-uri/expected/asset/roboto-v18-latin-300.ttf similarity index 100% rename from packages/rspack/tests/cssExtract/cases/base-uri/expected/asset/roboto-v18-latin-300.ttf rename to plugin-test/css-extract/cases/base-uri/expected/asset/roboto-v18-latin-300.ttf diff --git a/packages/rspack/tests/cssExtract/cases/base-uri/expected/index.css b/plugin-test/css-extract/cases/base-uri/expected/index.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/base-uri/expected/index.css rename to plugin-test/css-extract/cases/base-uri/expected/index.css diff --git a/packages/rspack/tests/cssExtract/cases/base-uri/fonts/roboto-v18-latin-300.ttf b/plugin-test/css-extract/cases/base-uri/fonts/roboto-v18-latin-300.ttf similarity index 100% rename from packages/rspack/tests/cssExtract/cases/base-uri/fonts/roboto-v18-latin-300.ttf rename to plugin-test/css-extract/cases/base-uri/fonts/roboto-v18-latin-300.ttf diff --git a/packages/rspack/tests/cssExtract/cases/base-uri/index.js b/plugin-test/css-extract/cases/base-uri/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/base-uri/index.js rename to plugin-test/css-extract/cases/base-uri/index.js diff --git a/packages/rspack/tests/cssExtract/cases/base-uri/main.css b/plugin-test/css-extract/cases/base-uri/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/base-uri/main.css rename to plugin-test/css-extract/cases/base-uri/main.css diff --git a/packages/rspack/tests/cssExtract/cases/base-uri/webpack.config.js b/plugin-test/css-extract/cases/base-uri/webpack.config.js similarity index 92% rename from packages/rspack/tests/cssExtract/cases/base-uri/webpack.config.js rename to plugin-test/css-extract/cases/base-uri/webpack.config.js index b32bad58141..4cd923b7be2 100644 --- a/packages/rspack/tests/cssExtract/cases/base-uri/webpack.config.js +++ b/plugin-test/css-extract/cases/base-uri/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); /** * @type {import('@rspack/core').Configuration} diff --git a/packages/rspack/tests/cssExtract/cases/build-in-css-support/index.js b/plugin-test/css-extract/cases/build-in-css-support/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/build-in-css-support/index.js rename to plugin-test/css-extract/cases/build-in-css-support/index.js diff --git a/packages/rspack/tests/cssExtract/cases/build-in-css-support/style.css b/plugin-test/css-extract/cases/build-in-css-support/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/build-in-css-support/style.css rename to plugin-test/css-extract/cases/build-in-css-support/style.css diff --git a/packages/rspack/tests/cssExtract/cases/build-in-css-support/warnings.js b/plugin-test/css-extract/cases/build-in-css-support/warnings.js similarity index 85% rename from packages/rspack/tests/cssExtract/cases/build-in-css-support/warnings.js rename to plugin-test/css-extract/cases/build-in-css-support/warnings.js index 21c542e68c3..3664b57b3ea 100644 --- a/packages/rspack/tests/cssExtract/cases/build-in-css-support/warnings.js +++ b/plugin-test/css-extract/cases/build-in-css-support/warnings.js @@ -1,5 +1,5 @@ // should receive warning from css-loader, -// however we don't suppot loaderContext._module, +// however we don't support loaderContext._module, // css-loader uses loaderContext._module.type to // decide bailout on builtin css module diff --git a/packages/rspack/tests/cssExtract/cases/build-in-css-support/webpack.config.js b/plugin-test/css-extract/cases/build-in-css-support/webpack.config.js similarity index 84% rename from packages/rspack/tests/cssExtract/cases/build-in-css-support/webpack.config.js rename to plugin-test/css-extract/cases/build-in-css-support/webpack.config.js index 174190a51fc..6539959b9d4 100644 --- a/packages/rspack/tests/cssExtract/cases/build-in-css-support/webpack.config.js +++ b/plugin-test/css-extract/cases/build-in-css-support/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/chunkFilename-as-function/async.css b/plugin-test/css-extract/cases/chunkFilename-as-function/async.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/chunkFilename-as-function/async.css rename to plugin-test/css-extract/cases/chunkFilename-as-function/async.css diff --git a/packages/rspack/tests/cssExtract/cases/chunkFilename-as-function/expected/0.async.css b/plugin-test/css-extract/cases/chunkFilename-as-function/expected/0.async.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/chunkFilename-as-function/expected/0.async.css rename to plugin-test/css-extract/cases/chunkFilename-as-function/expected/0.async.css diff --git a/packages/rspack/tests/cssExtract/cases/chunkFilename-as-function/expected/main.css b/plugin-test/css-extract/cases/chunkFilename-as-function/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/chunkFilename-as-function/expected/main.css rename to plugin-test/css-extract/cases/chunkFilename-as-function/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/chunkFilename-as-function/index.js b/plugin-test/css-extract/cases/chunkFilename-as-function/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/chunkFilename-as-function/index.js rename to plugin-test/css-extract/cases/chunkFilename-as-function/index.js diff --git a/packages/rspack/tests/cssExtract/cases/chunkFilename-as-function/style.css b/plugin-test/css-extract/cases/chunkFilename-as-function/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/chunkFilename-as-function/style.css rename to plugin-test/css-extract/cases/chunkFilename-as-function/style.css diff --git a/packages/rspack/tests/cssExtract/cases/chunkFilename-as-function/test.filter.js b/plugin-test/css-extract/cases/chunkFilename-as-function/test.filter.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/chunkFilename-as-function/test.filter.js rename to plugin-test/css-extract/cases/chunkFilename-as-function/test.filter.js diff --git a/packages/rspack/tests/cssExtract/cases/chunkFilename-as-function/webpack.config.js b/plugin-test/css-extract/cases/chunkFilename-as-function/webpack.config.js similarity index 83% rename from packages/rspack/tests/cssExtract/cases/chunkFilename-as-function/webpack.config.js rename to plugin-test/css-extract/cases/chunkFilename-as-function/webpack.config.js index 7aa8af2f986..cd7eb611be9 100644 --- a/packages/rspack/tests/cssExtract/cases/chunkFilename-as-function/webpack.config.js +++ b/plugin-test/css-extract/cases/chunkFilename-as-function/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/chunkFilename-fullhash/async.css b/plugin-test/css-extract/cases/chunkFilename-fullhash/async.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/chunkFilename-fullhash/async.css rename to plugin-test/css-extract/cases/chunkFilename-fullhash/async.css diff --git a/packages/rspack/tests/cssExtract/cases/chunkFilename-fullhash/expected/async.$4a0ea13f06b79fcb8334$.css b/plugin-test/css-extract/cases/chunkFilename-fullhash/expected/async.$661ca2e0fb9fdd30008c$.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/chunkFilename-fullhash/expected/async.$4a0ea13f06b79fcb8334$.css rename to plugin-test/css-extract/cases/chunkFilename-fullhash/expected/async.$661ca2e0fb9fdd30008c$.css diff --git a/packages/rspack/tests/cssExtract/cases/no-runtime/expected/async.js b/plugin-test/css-extract/cases/chunkFilename-fullhash/expected/async.js similarity index 77% rename from packages/rspack/tests/cssExtract/cases/no-runtime/expected/async.js rename to plugin-test/css-extract/cases/chunkFilename-fullhash/expected/async.js index 4f3d5d8ab7e..b638abf8a06 100644 --- a/packages/rspack/tests/cssExtract/cases/no-runtime/expected/async.js +++ b/plugin-test/css-extract/cases/chunkFilename-fullhash/expected/async.js @@ -1,5 +1,5 @@ (self['webpackChunk'] = self['webpackChunk'] || []).push([["async"], { -"./async.css?74c7": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { +"./async.css?833a": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // extracted by css-extract-rspack-plugin diff --git a/packages/rspack/tests/cssExtract/cases/chunkFilename-fullhash/expected/main.$4a0ea13f06b79fcb8334$.css b/plugin-test/css-extract/cases/chunkFilename-fullhash/expected/main.$661ca2e0fb9fdd30008c$.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/chunkFilename-fullhash/expected/main.$4a0ea13f06b79fcb8334$.css rename to plugin-test/css-extract/cases/chunkFilename-fullhash/expected/main.$661ca2e0fb9fdd30008c$.css diff --git a/packages/rspack/tests/cssExtract/cases/chunkFilename-fullhash/expected/main.js b/plugin-test/css-extract/cases/chunkFilename-fullhash/expected/main.js similarity index 98% rename from packages/rspack/tests/cssExtract/cases/chunkFilename-fullhash/expected/main.js rename to plugin-test/css-extract/cases/chunkFilename-fullhash/expected/main.js index 9b333241fdb..f9203530b8c 100644 --- a/packages/rspack/tests/cssExtract/cases/chunkFilename-fullhash/expected/main.js +++ b/plugin-test/css-extract/cases/chunkFilename-fullhash/expected/main.js @@ -1,6 +1,6 @@ (function() { var __webpack_modules__ = { -"./style.css?76f1": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { +"./style.css?b16f": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // extracted by css-extract-rspack-plugin @@ -9,9 +9,9 @@ __webpack_require__.r(__webpack_exports__); "./index.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.css */"./style.css?76f1"); +/* harmony import */var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.css */"./style.css?b16f"); -/* eslint-disable-next-line no-unused-expressions */ __webpack_require__.e("async").then(__webpack_require__.bind(__webpack_require__, /*! ./async.css */"./async.css?74c7")); +/* eslint-disable-next-line no-unused-expressions */ __webpack_require__.e("async").then(__webpack_require__.bind(__webpack_require__, /*! ./async.css */"./async.css?833a")); }), } @@ -75,7 +75,7 @@ __webpack_require__.e = function (chunkId) { // webpack/runtime/get_full_hash !function() { __webpack_require__.h = function () { - return "4a0ea13f06b79fcb8334"; + return "661ca2e0fb9fdd30008c"; }; }(); diff --git a/packages/rspack/tests/cssExtract/cases/chunkFilename-fullhash/index.js b/plugin-test/css-extract/cases/chunkFilename-fullhash/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/chunkFilename-fullhash/index.js rename to plugin-test/css-extract/cases/chunkFilename-fullhash/index.js diff --git a/packages/rspack/tests/cssExtract/cases/chunkFilename-fullhash/style.css b/plugin-test/css-extract/cases/chunkFilename-fullhash/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/chunkFilename-fullhash/style.css rename to plugin-test/css-extract/cases/chunkFilename-fullhash/style.css diff --git a/packages/rspack/tests/cssExtract/cases/chunkFilename-fullhash/webpack.config.js b/plugin-test/css-extract/cases/chunkFilename-fullhash/webpack.config.js similarity index 84% rename from packages/rspack/tests/cssExtract/cases/chunkFilename-fullhash/webpack.config.js rename to plugin-test/css-extract/cases/chunkFilename-fullhash/webpack.config.js index 86836a03055..3915f8bea67 100644 --- a/packages/rspack/tests/cssExtract/cases/chunkFilename-fullhash/webpack.config.js +++ b/plugin-test/css-extract/cases/chunkFilename-fullhash/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/chunkFilename/async.css b/plugin-test/css-extract/cases/chunkFilename/async.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/chunkFilename/async.css rename to plugin-test/css-extract/cases/chunkFilename/async.css diff --git a/packages/rspack/tests/cssExtract/cases/chunkFilename/expected/515.async.css b/plugin-test/css-extract/cases/chunkFilename/expected/515.async.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/chunkFilename/expected/515.async.css rename to plugin-test/css-extract/cases/chunkFilename/expected/515.async.css diff --git a/packages/rspack/tests/cssExtract/cases/chunkFilename/expected/main.css b/plugin-test/css-extract/cases/chunkFilename/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/chunkFilename/expected/main.css rename to plugin-test/css-extract/cases/chunkFilename/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/chunkFilename/index.js b/plugin-test/css-extract/cases/chunkFilename/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/chunkFilename/index.js rename to plugin-test/css-extract/cases/chunkFilename/index.js diff --git a/packages/rspack/tests/cssExtract/cases/chunkFilename/style.css b/plugin-test/css-extract/cases/chunkFilename/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/chunkFilename/style.css rename to plugin-test/css-extract/cases/chunkFilename/style.css diff --git a/packages/rspack/tests/cssExtract/cases/chunkFilename/webpack.config.js b/plugin-test/css-extract/cases/chunkFilename/webpack.config.js similarity index 84% rename from packages/rspack/tests/cssExtract/cases/chunkFilename/webpack.config.js rename to plugin-test/css-extract/cases/chunkFilename/webpack.config.js index d09c9c4f828..2495850ab3d 100644 --- a/packages/rspack/tests/cssExtract/cases/chunkFilename/webpack.config.js +++ b/plugin-test/css-extract/cases/chunkFilename/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/commonjs-module-syntax/expected/main.css b/plugin-test/css-extract/cases/commonjs-module-syntax/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/commonjs-module-syntax/expected/main.css rename to plugin-test/css-extract/cases/commonjs-module-syntax/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/commonjs-module-syntax/index.js b/plugin-test/css-extract/cases/commonjs-module-syntax/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/commonjs-module-syntax/index.js rename to plugin-test/css-extract/cases/commonjs-module-syntax/index.js diff --git a/packages/rspack/tests/cssExtract/cases/commonjs-module-syntax/style.css b/plugin-test/css-extract/cases/commonjs-module-syntax/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/commonjs-module-syntax/style.css rename to plugin-test/css-extract/cases/commonjs-module-syntax/style.css diff --git a/packages/rspack/tests/cssExtract/cases/commonjs-module-syntax/webpack.config.js b/plugin-test/css-extract/cases/commonjs-module-syntax/webpack.config.js similarity index 88% rename from packages/rspack/tests/cssExtract/cases/commonjs-module-syntax/webpack.config.js rename to plugin-test/css-extract/cases/commonjs-module-syntax/webpack.config.js index a256dc5e3ba..90c9b368455 100644 --- a/packages/rspack/tests/cssExtract/cases/commonjs-module-syntax/webpack.config.js +++ b/plugin-test/css-extract/cases/commonjs-module-syntax/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/composes-async/async-1.css b/plugin-test/css-extract/cases/composes-async/async-1.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/composes-async/async-1.css rename to plugin-test/css-extract/cases/composes-async/async-1.css diff --git a/packages/rspack/tests/cssExtract/cases/composes-async/async-2.css b/plugin-test/css-extract/cases/composes-async/async-2.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/composes-async/async-2.css rename to plugin-test/css-extract/cases/composes-async/async-2.css diff --git a/packages/rspack/tests/cssExtract/cases/composes-async/expected/async-1.css b/plugin-test/css-extract/cases/composes-async/expected/async-1.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/composes-async/expected/async-1.css rename to plugin-test/css-extract/cases/composes-async/expected/async-1.css diff --git a/packages/rspack/tests/cssExtract/cases/composes-async/expected/dedupe.css b/plugin-test/css-extract/cases/composes-async/expected/dedupe.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/composes-async/expected/dedupe.css rename to plugin-test/css-extract/cases/composes-async/expected/dedupe.css diff --git a/packages/rspack/tests/cssExtract/cases/composes-async/index.js b/plugin-test/css-extract/cases/composes-async/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/composes-async/index.js rename to plugin-test/css-extract/cases/composes-async/index.js diff --git a/packages/rspack/tests/cssExtract/cases/composes-async/webpack.config.js b/plugin-test/css-extract/cases/composes-async/webpack.config.js similarity index 90% rename from packages/rspack/tests/cssExtract/cases/composes-async/webpack.config.js rename to plugin-test/css-extract/cases/composes-async/webpack.config.js index 37f6a000bcf..a676d6e25e6 100644 --- a/packages/rspack/tests/cssExtract/cases/composes-async/webpack.config.js +++ b/plugin-test/css-extract/cases/composes-async/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/content-entries-with-same-import/expected/one_js.$34ea7e852b73f29ba7a5b065d4eec971$.css b/plugin-test/css-extract/cases/content-entries-with-same-import/expected/one_js.$34ea7e852b73f29ba7a5b065d4eec971$.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/content-entries-with-same-import/expected/one_js.$34ea7e852b73f29ba7a5b065d4eec971$.css rename to plugin-test/css-extract/cases/content-entries-with-same-import/expected/one_js.$34ea7e852b73f29ba7a5b065d4eec971$.css diff --git a/packages/rspack/tests/cssExtract/cases/content-entries-with-same-import/expected/two_js.$1286cc6ec04dae701cfb317f9b9aa178$.css b/plugin-test/css-extract/cases/content-entries-with-same-import/expected/two_js.$1286cc6ec04dae701cfb317f9b9aa178$.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/content-entries-with-same-import/expected/two_js.$1286cc6ec04dae701cfb317f9b9aa178$.css rename to plugin-test/css-extract/cases/content-entries-with-same-import/expected/two_js.$1286cc6ec04dae701cfb317f9b9aa178$.css diff --git a/packages/rspack/tests/cssExtract/cases/content-entries-with-same-import/index.js b/plugin-test/css-extract/cases/content-entries-with-same-import/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/content-entries-with-same-import/index.js rename to plugin-test/css-extract/cases/content-entries-with-same-import/index.js diff --git a/packages/rspack/tests/cssExtract/cases/content-entries-with-same-import/one.js b/plugin-test/css-extract/cases/content-entries-with-same-import/one.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/content-entries-with-same-import/one.js rename to plugin-test/css-extract/cases/content-entries-with-same-import/one.js diff --git a/packages/rspack/tests/cssExtract/cases/content-entries-with-same-import/style1.css b/plugin-test/css-extract/cases/content-entries-with-same-import/style1.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/content-entries-with-same-import/style1.css rename to plugin-test/css-extract/cases/content-entries-with-same-import/style1.css diff --git a/packages/rspack/tests/cssExtract/cases/content-entries-with-same-import/style2.css b/plugin-test/css-extract/cases/content-entries-with-same-import/style2.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/content-entries-with-same-import/style2.css rename to plugin-test/css-extract/cases/content-entries-with-same-import/style2.css diff --git a/packages/rspack/tests/cssExtract/cases/content-entries-with-same-import/two.js b/plugin-test/css-extract/cases/content-entries-with-same-import/two.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/content-entries-with-same-import/two.js rename to plugin-test/css-extract/cases/content-entries-with-same-import/two.js diff --git a/packages/rspack/tests/cssExtract/cases/content-entries-with-same-import/webpack.config.js b/plugin-test/css-extract/cases/content-entries-with-same-import/webpack.config.js similarity index 85% rename from packages/rspack/tests/cssExtract/cases/content-entries-with-same-import/webpack.config.js rename to plugin-test/css-extract/cases/content-entries-with-same-import/webpack.config.js index 180141ae317..a5ab234ee72 100644 --- a/packages/rspack/tests/cssExtract/cases/content-entries-with-same-import/webpack.config.js +++ b/plugin-test/css-extract/cases/content-entries-with-same-import/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/contenthash-1/expected/main.$e29a42ed09bda57bc430ed9ccfa30f63$.css b/plugin-test/css-extract/cases/contenthash-1/expected/main.$e29a42ed09bda57bc430ed9ccfa30f63$.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/contenthash-1/expected/main.$e29a42ed09bda57bc430ed9ccfa30f63$.css rename to plugin-test/css-extract/cases/contenthash-1/expected/main.$e29a42ed09bda57bc430ed9ccfa30f63$.css diff --git a/packages/rspack/tests/cssExtract/cases/contenthash-1/index.js b/plugin-test/css-extract/cases/contenthash-1/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/contenthash-1/index.js rename to plugin-test/css-extract/cases/contenthash-1/index.js diff --git a/packages/rspack/tests/cssExtract/cases/contenthash-1/lib.js b/plugin-test/css-extract/cases/contenthash-1/lib.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/contenthash-1/lib.js rename to plugin-test/css-extract/cases/contenthash-1/lib.js diff --git a/packages/rspack/tests/cssExtract/cases/contenthash-1/style.css b/plugin-test/css-extract/cases/contenthash-1/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/contenthash-1/style.css rename to plugin-test/css-extract/cases/contenthash-1/style.css diff --git a/packages/rspack/tests/cssExtract/cases/contenthash-1/webpack.config.js b/plugin-test/css-extract/cases/contenthash-1/webpack.config.js similarity index 84% rename from packages/rspack/tests/cssExtract/cases/contenthash-1/webpack.config.js rename to plugin-test/css-extract/cases/contenthash-1/webpack.config.js index 572d879eee0..b91e1c0acad 100644 --- a/packages/rspack/tests/cssExtract/cases/contenthash-1/webpack.config.js +++ b/plugin-test/css-extract/cases/contenthash-1/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/entryA.js b/plugin-test/css-extract/cases/contenthash-multiple-entries/entryA.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/entryA.js rename to plugin-test/css-extract/cases/contenthash-multiple-entries/entryA.js diff --git a/packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/entryB.js b/plugin-test/css-extract/cases/contenthash-multiple-entries/entryB.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/entryB.js rename to plugin-test/css-extract/cases/contenthash-multiple-entries/entryB.js diff --git a/packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/entryC.js b/plugin-test/css-extract/cases/contenthash-multiple-entries/entryC.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/entryC.js rename to plugin-test/css-extract/cases/contenthash-multiple-entries/entryC.js diff --git a/packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/entryD.js b/plugin-test/css-extract/cases/contenthash-multiple-entries/entryD.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/entryD.js rename to plugin-test/css-extract/cases/contenthash-multiple-entries/entryD.js diff --git a/packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/entryE.js b/plugin-test/css-extract/cases/contenthash-multiple-entries/entryE.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/entryE.js rename to plugin-test/css-extract/cases/contenthash-multiple-entries/entryE.js diff --git a/packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/expected/entryA.$7102da6560e321434f72cdf38a5f9e22$.css b/plugin-test/css-extract/cases/contenthash-multiple-entries/expected/entryA.$7102da6560e321434f72cdf38a5f9e22$.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/expected/entryA.$7102da6560e321434f72cdf38a5f9e22$.css rename to plugin-test/css-extract/cases/contenthash-multiple-entries/expected/entryA.$7102da6560e321434f72cdf38a5f9e22$.css diff --git a/packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/expected/entryB.$ea9aedf549e60226448ece39da68f162$.css b/plugin-test/css-extract/cases/contenthash-multiple-entries/expected/entryB.$ea9aedf549e60226448ece39da68f162$.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/expected/entryB.$ea9aedf549e60226448ece39da68f162$.css rename to plugin-test/css-extract/cases/contenthash-multiple-entries/expected/entryB.$ea9aedf549e60226448ece39da68f162$.css diff --git a/packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/styleA.css b/plugin-test/css-extract/cases/contenthash-multiple-entries/styleA.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/styleA.css rename to plugin-test/css-extract/cases/contenthash-multiple-entries/styleA.css diff --git a/packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/styleB.css b/plugin-test/css-extract/cases/contenthash-multiple-entries/styleB.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/styleB.css rename to plugin-test/css-extract/cases/contenthash-multiple-entries/styleB.css diff --git a/packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/styleC.css b/plugin-test/css-extract/cases/contenthash-multiple-entries/styleC.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/styleC.css rename to plugin-test/css-extract/cases/contenthash-multiple-entries/styleC.css diff --git a/packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/styleD.css b/plugin-test/css-extract/cases/contenthash-multiple-entries/styleD.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/styleD.css rename to plugin-test/css-extract/cases/contenthash-multiple-entries/styleD.css diff --git a/packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/webpack.config.js b/plugin-test/css-extract/cases/contenthash-multiple-entries/webpack.config.js similarity index 87% rename from packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/webpack.config.js rename to plugin-test/css-extract/cases/contenthash-multiple-entries/webpack.config.js index ebd42aa9c40..e16aa183249 100644 --- a/packages/rspack/tests/cssExtract/cases/contenthash-multiple-entries/webpack.config.js +++ b/plugin-test/css-extract/cases/contenthash-multiple-entries/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: { diff --git a/packages/rspack/tests/cssExtract/cases/contenthash/expected/1.main.$b8738e31859438bcaaf82f0e18ccb8e1$.css b/plugin-test/css-extract/cases/contenthash/expected/1.main.$b8738e31859438bcaaf82f0e18ccb8e1$.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/contenthash/expected/1.main.$b8738e31859438bcaaf82f0e18ccb8e1$.css rename to plugin-test/css-extract/cases/contenthash/expected/1.main.$b8738e31859438bcaaf82f0e18ccb8e1$.css diff --git a/packages/rspack/tests/cssExtract/cases/contenthash/expected/2.main.$22a4c275951727d855be6683d3f1b3b7$.css b/plugin-test/css-extract/cases/contenthash/expected/2.main.$22a4c275951727d855be6683d3f1b3b7$.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/contenthash/expected/2.main.$22a4c275951727d855be6683d3f1b3b7$.css rename to plugin-test/css-extract/cases/contenthash/expected/2.main.$22a4c275951727d855be6683d3f1b3b7$.css diff --git a/packages/rspack/tests/cssExtract/cases/contenthash/index.js b/plugin-test/css-extract/cases/contenthash/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/contenthash/index.js rename to plugin-test/css-extract/cases/contenthash/index.js diff --git a/packages/rspack/tests/cssExtract/cases/contenthash/style1.css b/plugin-test/css-extract/cases/contenthash/style1.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/contenthash/style1.css rename to plugin-test/css-extract/cases/contenthash/style1.css diff --git a/packages/rspack/tests/cssExtract/cases/contenthash/style2.css b/plugin-test/css-extract/cases/contenthash/style2.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/contenthash/style2.css rename to plugin-test/css-extract/cases/contenthash/style2.css diff --git a/packages/rspack/tests/cssExtract/cases/contenthash/webpack.config.js b/plugin-test/css-extract/cases/contenthash/webpack.config.js similarity index 87% rename from packages/rspack/tests/cssExtract/cases/contenthash/webpack.config.js rename to plugin-test/css-extract/cases/contenthash/webpack.config.js index 6401d578e10..c88bb048dad 100644 --- a/packages/rspack/tests/cssExtract/cases/contenthash/webpack.config.js +++ b/plugin-test/css-extract/cases/contenthash/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = [1, 2].map(n => { return { diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-functional-exports/app/index.js b/plugin-test/css-extract/cases/custom-loader-with-functional-exports/app/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-functional-exports/app/index.js rename to plugin-test/css-extract/cases/custom-loader-with-functional-exports/app/index.js diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-functional-exports/app/mockLoader.js b/plugin-test/css-extract/cases/custom-loader-with-functional-exports/app/mockLoader.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-functional-exports/app/mockLoader.js rename to plugin-test/css-extract/cases/custom-loader-with-functional-exports/app/mockLoader.js diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-functional-exports/app/style.css b/plugin-test/css-extract/cases/custom-loader-with-functional-exports/app/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-functional-exports/app/style.css rename to plugin-test/css-extract/cases/custom-loader-with-functional-exports/app/style.css diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-functional-exports/expected/main.css b/plugin-test/css-extract/cases/custom-loader-with-functional-exports/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-functional-exports/expected/main.css rename to plugin-test/css-extract/cases/custom-loader-with-functional-exports/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-functional-exports/expected/main.js b/plugin-test/css-extract/cases/custom-loader-with-functional-exports/expected/main.js similarity index 94% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-functional-exports/expected/main.js rename to plugin-test/css-extract/cases/custom-loader-with-functional-exports/expected/main.js index c9cd95c8d5f..5ad3ea8ba6b 100644 --- a/packages/rspack/tests/cssExtract/cases/custom-loader-with-functional-exports/expected/main.js +++ b/plugin-test/css-extract/cases/custom-loader-with-functional-exports/expected/main.js @@ -1,6 +1,6 @@ (function() { var __webpack_modules__ = { -"./style.css?8c1b": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { +"./style.css?3e20": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, { @@ -14,7 +14,7 @@ var cnB = ()=>"class-name-b"; "./index.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.css */"./style.css?8c1b"); +/* harmony import */var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.css */"./style.css?3e20"); // eslint-disable-next-line no-console console.log((0, _style_css__WEBPACK_IMPORTED_MODULE_0__.cnA)(), (0, _style_css__WEBPACK_IMPORTED_MODULE_0__.cnB)()); diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-functional-exports/webpack.config.js b/plugin-test/css-extract/cases/custom-loader-with-functional-exports/webpack.config.js similarity index 83% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-functional-exports/webpack.config.js rename to plugin-test/css-extract/cases/custom-loader-with-functional-exports/webpack.config.js index 84cd1299f2e..54ac09095ff 100644 --- a/packages/rspack/tests/cssExtract/cases/custom-loader-with-functional-exports/webpack.config.js +++ b/plugin-test/css-extract/cases/custom-loader-with-functional-exports/webpack.config.js @@ -1,5 +1,5 @@ const path = require("path"); -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-1/app/img.png b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-1/app/img.png similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-1/app/img.png rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-1/app/img.png diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-1/app/index.js b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-1/app/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-1/app/index.js rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-1/app/index.js diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-1/app/mockLoader.js b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-1/app/mockLoader.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-1/app/mockLoader.js rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-1/app/mockLoader.js diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-1/app/nested/nested-img.png b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-1/app/nested/nested-img.png similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-1/app/nested/nested-img.png rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-1/app/nested/nested-img.png diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-1/app/style.css b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-1/app/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-1/app/style.css rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-1/app/style.css diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-1/expected/webpack-5-importModule/main.css b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-1/expected/webpack-5-importModule/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-1/expected/webpack-5-importModule/main.css rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-1/expected/webpack-5-importModule/main.css diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-1/expected/webpack-5/main.css b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-1/expected/webpack-5/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-1/expected/webpack-5/main.css rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-1/expected/webpack-5/main.css diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-1/outer-img.png b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-1/outer-img.png similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-1/outer-img.png rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-1/outer-img.png diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-1/webpack.config.js b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-1/webpack.config.js similarity index 89% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-1/webpack.config.js rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-1/webpack.config.js index 742098d9cf3..fc7d85819a0 100644 --- a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-1/webpack.config.js +++ b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-1/webpack.config.js @@ -1,6 +1,6 @@ const path = require("path"); -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-auto/app/img.png b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-auto/app/img.png similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-auto/app/img.png rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-auto/app/img.png diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-auto/app/index.js b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-auto/app/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-auto/app/index.js rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-auto/app/index.js diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-auto/app/mockLoader.js b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-auto/app/mockLoader.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-auto/app/mockLoader.js rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-auto/app/mockLoader.js diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-auto/app/nested/nested-img.png b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-auto/app/nested/nested-img.png similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-auto/app/nested/nested-img.png rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-auto/app/nested/nested-img.png diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-auto/app/style.css b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-auto/app/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-auto/app/style.css rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-auto/app/style.css diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-auto/expected/main.css b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-auto/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-auto/expected/main.css rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-auto/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-auto/outer-img.png b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-auto/outer-img.png similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-auto/outer-img.png rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-auto/outer-img.png diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-auto/webpack.config.js b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-auto/webpack.config.js similarity index 89% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-auto/webpack.config.js rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-auto/webpack.config.js index 1d1b260910d..4a2c81f40f2 100644 --- a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-auto/webpack.config.js +++ b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-auto/webpack.config.js @@ -1,6 +1,6 @@ const path = require("path"); -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-default-auto/app/img.png b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-default-auto/app/img.png similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-default-auto/app/img.png rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-default-auto/app/img.png diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-default-auto/app/index.js b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-default-auto/app/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-default-auto/app/index.js rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-default-auto/app/index.js diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-default-auto/app/mockLoader.js b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-default-auto/app/mockLoader.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-default-auto/app/mockLoader.js rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-default-auto/app/mockLoader.js diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-default-auto/app/nested/nested-img.png b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-default-auto/app/nested/nested-img.png similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-default-auto/app/nested/nested-img.png rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-default-auto/app/nested/nested-img.png diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-default-auto/app/style.css b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-default-auto/app/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-default-auto/app/style.css rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-default-auto/app/style.css diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-default-auto/expected/main.css b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-default-auto/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-default-auto/expected/main.css rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-default-auto/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-default-auto/outer-img.png b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-default-auto/outer-img.png similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-default-auto/outer-img.png rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-default-auto/outer-img.png diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-default-auto/webpack.config.js b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-default-auto/webpack.config.js similarity index 87% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-default-auto/webpack.config.js rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-default-auto/webpack.config.js index 8ff7d2dad93..b9bd957aa5a 100644 --- a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path-default-auto/webpack.config.js +++ b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path-default-auto/webpack.config.js @@ -1,6 +1,6 @@ const path = require("path"); -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path/app/img.png b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path/app/img.png similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path/app/img.png rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path/app/img.png diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path/app/index.js b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path/app/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path/app/index.js rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path/app/index.js diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path/app/mockLoader.js b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path/app/mockLoader.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path/app/mockLoader.js rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path/app/mockLoader.js diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path/app/nested/nested-img.png b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path/app/nested/nested-img.png similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path/app/nested/nested-img.png rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path/app/nested/nested-img.png diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path/app/style.css b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path/app/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path/app/style.css rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path/app/style.css diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path/expected/webpack-5-importModule/main.css b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path/expected/webpack-5-importModule/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path/expected/webpack-5-importModule/main.css rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path/expected/webpack-5-importModule/main.css diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path/expected/webpack-5/main.css b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path/expected/webpack-5/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path/expected/webpack-5/main.css rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path/expected/webpack-5/main.css diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path/outer-img.png b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path/outer-img.png similarity index 100% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path/outer-img.png rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path/outer-img.png diff --git a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path/webpack.config.js b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path/webpack.config.js similarity index 89% rename from packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path/webpack.config.js rename to plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path/webpack.config.js index f7ab18bd728..ea09bf9d02d 100644 --- a/packages/rspack/tests/cssExtract/cases/custom-loader-with-new-url-and-public-path/webpack.config.js +++ b/plugin-test/css-extract/cases/custom-loader-with-new-url-and-public-path/webpack.config.js @@ -1,6 +1,6 @@ const path = require("path"); -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/default-options/expected/main.css b/plugin-test/css-extract/cases/default-options/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/default-options/expected/main.css rename to plugin-test/css-extract/cases/default-options/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/default-options/index.js b/plugin-test/css-extract/cases/default-options/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/default-options/index.js rename to plugin-test/css-extract/cases/default-options/index.js diff --git a/packages/rspack/tests/cssExtract/cases/default-options/style.css b/plugin-test/css-extract/cases/default-options/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/default-options/style.css rename to plugin-test/css-extract/cases/default-options/style.css diff --git a/packages/rspack/tests/cssExtract/cases/default-options/webpack.config.js b/plugin-test/css-extract/cases/default-options/webpack.config.js similarity index 77% rename from packages/rspack/tests/cssExtract/cases/default-options/webpack.config.js rename to plugin-test/css-extract/cases/default-options/webpack.config.js index 227b1e3a2c1..61229953645 100644 --- a/packages/rspack/tests/cssExtract/cases/default-options/webpack.config.js +++ b/plugin-test/css-extract/cases/default-options/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/entryA.js b/plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/entryA.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/entryA.js rename to plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/entryA.js diff --git a/packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/entryB.js b/plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/entryB.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/entryB.js rename to plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/entryB.js diff --git a/packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/entryC.js b/plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/entryC.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/entryC.js rename to plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/entryC.js diff --git a/packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/entryD.js b/plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/entryD.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/entryD.js rename to plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/entryD.js diff --git a/packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/expected/common.css b/plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/expected/common.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/expected/common.css rename to plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/expected/common.css diff --git a/packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/expected/common.js b/plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/expected/common.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/expected/common.js rename to plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/expected/common.js diff --git a/packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/expected/entry1.css b/plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/expected/entry1.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/expected/entry1.css rename to plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/expected/entry1.css diff --git a/packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/expected/entry1.js b/plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/expected/entry1.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/expected/entry1.js rename to plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/expected/entry1.js diff --git a/packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/styleA.css b/plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/styleA.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/styleA.css rename to plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/styleA.css diff --git a/packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/styleB.css b/plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/styleB.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/styleB.css rename to plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/styleB.css diff --git a/packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/styleC.css b/plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/styleC.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/styleC.css rename to plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/styleC.css diff --git a/packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/styleD.css b/plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/styleD.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/styleD.css rename to plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/styleD.css diff --git a/packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/test.filter.js b/plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/test.filter.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/test.filter.js rename to plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/test.filter.js diff --git a/packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/webpack.config.js b/plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/webpack.config.js similarity index 85% rename from packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/webpack.config.js rename to plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/webpack.config.js index 09a73d27a3d..ae719b11590 100644 --- a/packages/rspack/tests/cssExtract/cases/dependOn-multiple-files-per-entry/webpack.config.js +++ b/plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: { diff --git a/packages/rspack/tests/cssExtract/cases/dependOn/entryA.js b/plugin-test/css-extract/cases/dependOn/entryA.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/dependOn/entryA.js rename to plugin-test/css-extract/cases/dependOn/entryA.js diff --git a/packages/rspack/tests/cssExtract/cases/dependOn/entryB.js b/plugin-test/css-extract/cases/dependOn/entryB.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/dependOn/entryB.js rename to plugin-test/css-extract/cases/dependOn/entryB.js diff --git a/packages/rspack/tests/cssExtract/cases/dependOn/expected/common.css b/plugin-test/css-extract/cases/dependOn/expected/common.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/dependOn/expected/common.css rename to plugin-test/css-extract/cases/dependOn/expected/common.css diff --git a/packages/rspack/tests/cssExtract/cases/dependOn/expected/common.js b/plugin-test/css-extract/cases/dependOn/expected/common.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/dependOn/expected/common.js rename to plugin-test/css-extract/cases/dependOn/expected/common.js diff --git a/packages/rspack/tests/cssExtract/cases/dependOn/expected/entry1.css b/plugin-test/css-extract/cases/dependOn/expected/entry1.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/dependOn/expected/entry1.css rename to plugin-test/css-extract/cases/dependOn/expected/entry1.css diff --git a/packages/rspack/tests/cssExtract/cases/dependOn/expected/entry1.js b/plugin-test/css-extract/cases/dependOn/expected/entry1.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/dependOn/expected/entry1.js rename to plugin-test/css-extract/cases/dependOn/expected/entry1.js diff --git a/packages/rspack/tests/cssExtract/cases/dependOn/styleA.css b/plugin-test/css-extract/cases/dependOn/styleA.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/dependOn/styleA.css rename to plugin-test/css-extract/cases/dependOn/styleA.css diff --git a/packages/rspack/tests/cssExtract/cases/dependOn/styleB.css b/plugin-test/css-extract/cases/dependOn/styleB.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/dependOn/styleB.css rename to plugin-test/css-extract/cases/dependOn/styleB.css diff --git a/packages/rspack/tests/cssExtract/cases/dependOn/test.filter.js b/plugin-test/css-extract/cases/dependOn/test.filter.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/dependOn/test.filter.js rename to plugin-test/css-extract/cases/dependOn/test.filter.js diff --git a/packages/rspack/tests/cssExtract/cases/dependOn/webpack.config.js b/plugin-test/css-extract/cases/dependOn/webpack.config.js similarity index 83% rename from packages/rspack/tests/cssExtract/cases/dependOn/webpack.config.js rename to plugin-test/css-extract/cases/dependOn/webpack.config.js index 7577b1a1179..d0c16157dd4 100644 --- a/packages/rspack/tests/cssExtract/cases/dependOn/webpack.config.js +++ b/plugin-test/css-extract/cases/dependOn/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: { diff --git a/packages/rspack/tests/cssExtract/cases/devtool-source-map-from-loaders/expected/main.css b/plugin-test/css-extract/cases/devtool-source-map-from-loaders/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/devtool-source-map-from-loaders/expected/main.css rename to plugin-test/css-extract/cases/devtool-source-map-from-loaders/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/devtool-source-map-from-loaders/expected/main.css.map b/plugin-test/css-extract/cases/devtool-source-map-from-loaders/expected/main.css.map similarity index 100% rename from packages/rspack/tests/cssExtract/cases/devtool-source-map-from-loaders/expected/main.css.map rename to plugin-test/css-extract/cases/devtool-source-map-from-loaders/expected/main.css.map diff --git a/packages/rspack/tests/cssExtract/cases/devtool-source-map-from-loaders/index.js b/plugin-test/css-extract/cases/devtool-source-map-from-loaders/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/devtool-source-map-from-loaders/index.js rename to plugin-test/css-extract/cases/devtool-source-map-from-loaders/index.js diff --git a/packages/rspack/tests/cssExtract/cases/devtool-source-map-from-loaders/style.css b/plugin-test/css-extract/cases/devtool-source-map-from-loaders/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/devtool-source-map-from-loaders/style.css rename to plugin-test/css-extract/cases/devtool-source-map-from-loaders/style.css diff --git a/packages/rspack/tests/cssExtract/cases/devtool-source-map-from-loaders/webpack.config.js b/plugin-test/css-extract/cases/devtool-source-map-from-loaders/webpack.config.js similarity index 85% rename from packages/rspack/tests/cssExtract/cases/devtool-source-map-from-loaders/webpack.config.js rename to plugin-test/css-extract/cases/devtool-source-map-from-loaders/webpack.config.js index 700e134cd30..5527b8c5b09 100644 --- a/packages/rspack/tests/cssExtract/cases/devtool-source-map-from-loaders/webpack.config.js +++ b/plugin-test/css-extract/cases/devtool-source-map-from-loaders/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/devtool-source-map-no-source-maps-from-loaders/expected/main.css b/plugin-test/css-extract/cases/devtool-source-map-no-source-maps-from-loaders/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/devtool-source-map-no-source-maps-from-loaders/expected/main.css rename to plugin-test/css-extract/cases/devtool-source-map-no-source-maps-from-loaders/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/devtool-source-map-no-source-maps-from-loaders/index.js b/plugin-test/css-extract/cases/devtool-source-map-no-source-maps-from-loaders/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/devtool-source-map-no-source-maps-from-loaders/index.js rename to plugin-test/css-extract/cases/devtool-source-map-no-source-maps-from-loaders/index.js diff --git a/packages/rspack/tests/cssExtract/cases/devtool-source-map-no-source-maps-from-loaders/style.css b/plugin-test/css-extract/cases/devtool-source-map-no-source-maps-from-loaders/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/devtool-source-map-no-source-maps-from-loaders/style.css rename to plugin-test/css-extract/cases/devtool-source-map-no-source-maps-from-loaders/style.css diff --git a/packages/rspack/tests/cssExtract/cases/devtool-source-map-no-source-maps-from-loaders/webpack.config.js b/plugin-test/css-extract/cases/devtool-source-map-no-source-maps-from-loaders/webpack.config.js similarity index 85% rename from packages/rspack/tests/cssExtract/cases/devtool-source-map-no-source-maps-from-loaders/webpack.config.js rename to plugin-test/css-extract/cases/devtool-source-map-no-source-maps-from-loaders/webpack.config.js index 071058ad333..186104a96a9 100644 --- a/packages/rspack/tests/cssExtract/cases/devtool-source-map-no-source-maps-from-loaders/webpack.config.js +++ b/plugin-test/css-extract/cases/devtool-source-map-no-source-maps-from-loaders/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/devtool-source-map/expected/main.css b/plugin-test/css-extract/cases/devtool-source-map/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/devtool-source-map/expected/main.css rename to plugin-test/css-extract/cases/devtool-source-map/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/devtool-source-map/expected/main.css.map b/plugin-test/css-extract/cases/devtool-source-map/expected/main.css.map similarity index 100% rename from packages/rspack/tests/cssExtract/cases/devtool-source-map/expected/main.css.map rename to plugin-test/css-extract/cases/devtool-source-map/expected/main.css.map diff --git a/packages/rspack/tests/cssExtract/cases/devtool-source-map/index.js b/plugin-test/css-extract/cases/devtool-source-map/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/devtool-source-map/index.js rename to plugin-test/css-extract/cases/devtool-source-map/index.js diff --git a/packages/rspack/tests/cssExtract/cases/devtool-source-map/style.css b/plugin-test/css-extract/cases/devtool-source-map/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/devtool-source-map/style.css rename to plugin-test/css-extract/cases/devtool-source-map/style.css diff --git a/packages/rspack/tests/cssExtract/cases/devtool-source-map/webpack.config.js b/plugin-test/css-extract/cases/devtool-source-map/webpack.config.js similarity index 81% rename from packages/rspack/tests/cssExtract/cases/devtool-source-map/webpack.config.js rename to plugin-test/css-extract/cases/devtool-source-map/webpack.config.js index ab9ae922291..db02e37ea0e 100644 --- a/packages/rspack/tests/cssExtract/cases/devtool-source-map/webpack.config.js +++ b/plugin-test/css-extract/cases/devtool-source-map/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/es-module-concatenation-modules/a.css b/plugin-test/css-extract/cases/es-module-concatenation-modules/a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-module-concatenation-modules/a.css rename to plugin-test/css-extract/cases/es-module-concatenation-modules/a.css diff --git a/packages/rspack/tests/cssExtract/cases/es-module-concatenation-modules/b.css b/plugin-test/css-extract/cases/es-module-concatenation-modules/b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-module-concatenation-modules/b.css rename to plugin-test/css-extract/cases/es-module-concatenation-modules/b.css diff --git a/packages/rspack/tests/cssExtract/cases/es-module-concatenation-modules/c.css b/plugin-test/css-extract/cases/es-module-concatenation-modules/c.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-module-concatenation-modules/c.css rename to plugin-test/css-extract/cases/es-module-concatenation-modules/c.css diff --git a/packages/rspack/tests/cssExtract/cases/es-module-concatenation-modules/expected/main.css b/plugin-test/css-extract/cases/es-module-concatenation-modules/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-module-concatenation-modules/expected/main.css rename to plugin-test/css-extract/cases/es-module-concatenation-modules/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/es-module-concatenation-modules/expected/main.js b/plugin-test/css-extract/cases/es-module-concatenation-modules/expected/main.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-module-concatenation-modules/expected/main.js rename to plugin-test/css-extract/cases/es-module-concatenation-modules/expected/main.js diff --git a/packages/rspack/tests/cssExtract/cases/es-module-concatenation-modules/index.js b/plugin-test/css-extract/cases/es-module-concatenation-modules/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-module-concatenation-modules/index.js rename to plugin-test/css-extract/cases/es-module-concatenation-modules/index.js diff --git a/packages/rspack/tests/cssExtract/cases/es-module-concatenation-modules/test.filter.js b/plugin-test/css-extract/cases/es-module-concatenation-modules/test.filter.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-module-concatenation-modules/test.filter.js rename to plugin-test/css-extract/cases/es-module-concatenation-modules/test.filter.js diff --git a/packages/rspack/tests/cssExtract/cases/es-module-concatenation-modules/webpack.config.js b/plugin-test/css-extract/cases/es-module-concatenation-modules/webpack.config.js similarity index 89% rename from packages/rspack/tests/cssExtract/cases/es-module-concatenation-modules/webpack.config.js rename to plugin-test/css-extract/cases/es-module-concatenation-modules/webpack.config.js index cbadfd1e019..3a1876aa396 100644 --- a/packages/rspack/tests/cssExtract/cases/es-module-concatenation-modules/webpack.config.js +++ b/plugin-test/css-extract/cases/es-module-concatenation-modules/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/es-module-concatenation/a.css b/plugin-test/css-extract/cases/es-module-concatenation/a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-module-concatenation/a.css rename to plugin-test/css-extract/cases/es-module-concatenation/a.css diff --git a/packages/rspack/tests/cssExtract/cases/es-module-concatenation/b.css b/plugin-test/css-extract/cases/es-module-concatenation/b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-module-concatenation/b.css rename to plugin-test/css-extract/cases/es-module-concatenation/b.css diff --git a/packages/rspack/tests/cssExtract/cases/es-module-concatenation/c.css b/plugin-test/css-extract/cases/es-module-concatenation/c.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-module-concatenation/c.css rename to plugin-test/css-extract/cases/es-module-concatenation/c.css diff --git a/packages/rspack/tests/cssExtract/cases/es-module-concatenation/expected/main.css b/plugin-test/css-extract/cases/es-module-concatenation/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-module-concatenation/expected/main.css rename to plugin-test/css-extract/cases/es-module-concatenation/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/es-module-concatenation/expected/main.js b/plugin-test/css-extract/cases/es-module-concatenation/expected/main.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-module-concatenation/expected/main.js rename to plugin-test/css-extract/cases/es-module-concatenation/expected/main.js diff --git a/packages/rspack/tests/cssExtract/cases/es-module-concatenation/index.js b/plugin-test/css-extract/cases/es-module-concatenation/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-module-concatenation/index.js rename to plugin-test/css-extract/cases/es-module-concatenation/index.js diff --git a/packages/rspack/tests/cssExtract/cases/es-module-concatenation/test.filter.js b/plugin-test/css-extract/cases/es-module-concatenation/test.filter.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-module-concatenation/test.filter.js rename to plugin-test/css-extract/cases/es-module-concatenation/test.filter.js diff --git a/packages/rspack/tests/cssExtract/cases/es-module-concatenation/webpack.config.js b/plugin-test/css-extract/cases/es-module-concatenation/webpack.config.js similarity index 86% rename from packages/rspack/tests/cssExtract/cases/es-module-concatenation/webpack.config.js rename to plugin-test/css-extract/cases/es-module-concatenation/webpack.config.js index df533f89350..00b16b4531c 100644 --- a/packages/rspack/tests/cssExtract/cases/es-module-concatenation/webpack.config.js +++ b/plugin-test/css-extract/cases/es-module-concatenation/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/es-module-syntax/expected/main.css b/plugin-test/css-extract/cases/es-module-syntax/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-module-syntax/expected/main.css rename to plugin-test/css-extract/cases/es-module-syntax/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/es-module-syntax/index.js b/plugin-test/css-extract/cases/es-module-syntax/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-module-syntax/index.js rename to plugin-test/css-extract/cases/es-module-syntax/index.js diff --git a/packages/rspack/tests/cssExtract/cases/es-module-syntax/style.css b/plugin-test/css-extract/cases/es-module-syntax/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-module-syntax/style.css rename to plugin-test/css-extract/cases/es-module-syntax/style.css diff --git a/packages/rspack/tests/cssExtract/cases/es-module-syntax/webpack.config.js b/plugin-test/css-extract/cases/es-module-syntax/webpack.config.js similarity index 88% rename from packages/rspack/tests/cssExtract/cases/es-module-syntax/webpack.config.js rename to plugin-test/css-extract/cases/es-module-syntax/webpack.config.js index e74eeb208c3..d993b6306cd 100644 --- a/packages/rspack/tests/cssExtract/cases/es-module-syntax/webpack.config.js +++ b/plugin-test/css-extract/cases/es-module-syntax/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/es-named-export-output-module/expected/main.css b/plugin-test/css-extract/cases/es-named-export-output-module/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-named-export-output-module/expected/main.css rename to plugin-test/css-extract/cases/es-named-export-output-module/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/es-named-export-output-module/expected/main.mjs b/plugin-test/css-extract/cases/es-named-export-output-module/expected/main.mjs similarity index 95% rename from packages/rspack/tests/cssExtract/cases/es-named-export-output-module/expected/main.mjs rename to plugin-test/css-extract/cases/es-named-export-output-module/expected/main.mjs index 81135c162de..f89c9e95619 100644 --- a/packages/rspack/tests/cssExtract/cases/es-named-export-output-module/expected/main.mjs +++ b/plugin-test/css-extract/cases/es-named-export-output-module/expected/main.mjs @@ -1,5 +1,5 @@ var __webpack_modules__ = { -"./style.css?8b3b": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { +"./style.css?eccb": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, { @@ -15,7 +15,7 @@ var cClass = "foo__style__cClass"; "./index.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.css */"./style.css?8b3b"); +/* harmony import */var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.css */"./style.css?eccb"); // eslint-disable-next-line no-console console.log({ diff --git a/packages/rspack/tests/cssExtract/cases/es-named-export-output-module/index.js b/plugin-test/css-extract/cases/es-named-export-output-module/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-named-export-output-module/index.js rename to plugin-test/css-extract/cases/es-named-export-output-module/index.js diff --git a/packages/rspack/tests/cssExtract/cases/es-named-export-output-module/style.css b/plugin-test/css-extract/cases/es-named-export-output-module/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-named-export-output-module/style.css rename to plugin-test/css-extract/cases/es-named-export-output-module/style.css diff --git a/packages/rspack/tests/cssExtract/cases/es-named-export-output-module/webpack.config.js b/plugin-test/css-extract/cases/es-named-export-output-module/webpack.config.js similarity index 89% rename from packages/rspack/tests/cssExtract/cases/es-named-export-output-module/webpack.config.js rename to plugin-test/css-extract/cases/es-named-export-output-module/webpack.config.js index f10cec5b475..b6c9b74741a 100644 --- a/packages/rspack/tests/cssExtract/cases/es-named-export-output-module/webpack.config.js +++ b/plugin-test/css-extract/cases/es-named-export-output-module/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/es-named-export/expected/main.css b/plugin-test/css-extract/cases/es-named-export/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-named-export/expected/main.css rename to plugin-test/css-extract/cases/es-named-export/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/es-named-export/expected/main.js b/plugin-test/css-extract/cases/es-named-export/expected/main.js similarity index 95% rename from packages/rspack/tests/cssExtract/cases/es-named-export/expected/main.js rename to plugin-test/css-extract/cases/es-named-export/expected/main.js index 4260ca0eb11..adb27960086 100644 --- a/packages/rspack/tests/cssExtract/cases/es-named-export/expected/main.js +++ b/plugin-test/css-extract/cases/es-named-export/expected/main.js @@ -1,6 +1,6 @@ (function() { var __webpack_modules__ = { -"./style.css?8b3b": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { +"./style.css?eccb": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, { @@ -16,7 +16,7 @@ var cClass = "foo__style__cClass"; "./index.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.css */"./style.css?8b3b"); +/* harmony import */var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.css */"./style.css?eccb"); // eslint-disable-next-line no-console console.log({ diff --git a/packages/rspack/tests/cssExtract/cases/es-named-export/index.js b/plugin-test/css-extract/cases/es-named-export/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-named-export/index.js rename to plugin-test/css-extract/cases/es-named-export/index.js diff --git a/packages/rspack/tests/cssExtract/cases/es-named-export/style.css b/plugin-test/css-extract/cases/es-named-export/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/es-named-export/style.css rename to plugin-test/css-extract/cases/es-named-export/style.css diff --git a/packages/rspack/tests/cssExtract/cases/es-named-export/webpack.config.js b/plugin-test/css-extract/cases/es-named-export/webpack.config.js similarity index 88% rename from packages/rspack/tests/cssExtract/cases/es-named-export/webpack.config.js rename to plugin-test/css-extract/cases/es-named-export/webpack.config.js index 30ac633062b..d86536a2937 100644 --- a/packages/rspack/tests/cssExtract/cases/es-named-export/webpack.config.js +++ b/plugin-test/css-extract/cases/es-named-export/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-false/expected/main.css b/plugin-test/css-extract/cases/experimentalUseImportModule-false/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-false/expected/main.css rename to plugin-test/css-extract/cases/experimentalUseImportModule-false/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-false/index.js b/plugin-test/css-extract/cases/experimentalUseImportModule-false/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-false/index.js rename to plugin-test/css-extract/cases/experimentalUseImportModule-false/index.js diff --git a/packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-false/style.css b/plugin-test/css-extract/cases/experimentalUseImportModule-false/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-false/style.css rename to plugin-test/css-extract/cases/experimentalUseImportModule-false/style.css diff --git a/packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-false/webpack.config.js b/plugin-test/css-extract/cases/experimentalUseImportModule-false/webpack.config.js similarity index 82% rename from packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-false/webpack.config.js rename to plugin-test/css-extract/cases/experimentalUseImportModule-false/webpack.config.js index 8dc776342de..f86c10776e9 100644 --- a/packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-false/webpack.config.js +++ b/plugin-test/css-extract/cases/experimentalUseImportModule-false/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-true/expected/main.css b/plugin-test/css-extract/cases/experimentalUseImportModule-true/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-true/expected/main.css rename to plugin-test/css-extract/cases/experimentalUseImportModule-true/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-true/index.js b/plugin-test/css-extract/cases/experimentalUseImportModule-true/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-true/index.js rename to plugin-test/css-extract/cases/experimentalUseImportModule-true/index.js diff --git a/packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-true/style.css b/plugin-test/css-extract/cases/experimentalUseImportModule-true/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-true/style.css rename to plugin-test/css-extract/cases/experimentalUseImportModule-true/style.css diff --git a/packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-true/webpack.config.js b/plugin-test/css-extract/cases/experimentalUseImportModule-true/webpack.config.js similarity index 82% rename from packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-true/webpack.config.js rename to plugin-test/css-extract/cases/experimentalUseImportModule-true/webpack.config.js index 7d6c1960ddb..61f9a91cd25 100644 --- a/packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-true/webpack.config.js +++ b/plugin-test/css-extract/cases/experimentalUseImportModule-true/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-undefined/expected/main.css b/plugin-test/css-extract/cases/experimentalUseImportModule-undefined/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-undefined/expected/main.css rename to plugin-test/css-extract/cases/experimentalUseImportModule-undefined/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-undefined/index.js b/plugin-test/css-extract/cases/experimentalUseImportModule-undefined/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-undefined/index.js rename to plugin-test/css-extract/cases/experimentalUseImportModule-undefined/index.js diff --git a/packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-undefined/style.css b/plugin-test/css-extract/cases/experimentalUseImportModule-undefined/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-undefined/style.css rename to plugin-test/css-extract/cases/experimentalUseImportModule-undefined/style.css diff --git a/packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-undefined/webpack.config.js b/plugin-test/css-extract/cases/experimentalUseImportModule-undefined/webpack.config.js similarity index 84% rename from packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-undefined/webpack.config.js rename to plugin-test/css-extract/cases/experimentalUseImportModule-undefined/webpack.config.js index faef48050ee..00dff920440 100644 --- a/packages/rspack/tests/cssExtract/cases/experimentalUseImportModule-undefined/webpack.config.js +++ b/plugin-test/css-extract/cases/experimentalUseImportModule-undefined/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/export-only-locals-and-es-named-export/expected/main.js b/plugin-test/css-extract/cases/export-only-locals-and-es-named-export/expected/main.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/export-only-locals-and-es-named-export/expected/main.js rename to plugin-test/css-extract/cases/export-only-locals-and-es-named-export/expected/main.js diff --git a/packages/rspack/tests/cssExtract/cases/export-only-locals-and-es-named-export/index.js b/plugin-test/css-extract/cases/export-only-locals-and-es-named-export/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/export-only-locals-and-es-named-export/index.js rename to plugin-test/css-extract/cases/export-only-locals-and-es-named-export/index.js diff --git a/packages/rspack/tests/cssExtract/cases/export-only-locals-and-es-named-export/style.css b/plugin-test/css-extract/cases/export-only-locals-and-es-named-export/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/export-only-locals-and-es-named-export/style.css rename to plugin-test/css-extract/cases/export-only-locals-and-es-named-export/style.css diff --git a/packages/rspack/tests/cssExtract/cases/export-only-locals-and-es-named-export/webpack.config.js b/plugin-test/css-extract/cases/export-only-locals-and-es-named-export/webpack.config.js similarity index 88% rename from packages/rspack/tests/cssExtract/cases/export-only-locals-and-es-named-export/webpack.config.js rename to plugin-test/css-extract/cases/export-only-locals-and-es-named-export/webpack.config.js index 1b9e2661d7b..69750cc3480 100644 --- a/packages/rspack/tests/cssExtract/cases/export-only-locals-and-es-named-export/webpack.config.js +++ b/plugin-test/css-extract/cases/export-only-locals-and-es-named-export/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/export-only-locals-commonjs/expected/main.js b/plugin-test/css-extract/cases/export-only-locals-commonjs/expected/main.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/export-only-locals-commonjs/expected/main.js rename to plugin-test/css-extract/cases/export-only-locals-commonjs/expected/main.js diff --git a/packages/rspack/tests/cssExtract/cases/export-only-locals-commonjs/index.js b/plugin-test/css-extract/cases/export-only-locals-commonjs/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/export-only-locals-commonjs/index.js rename to plugin-test/css-extract/cases/export-only-locals-commonjs/index.js diff --git a/packages/rspack/tests/cssExtract/cases/export-only-locals-commonjs/style.css b/plugin-test/css-extract/cases/export-only-locals-commonjs/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/export-only-locals-commonjs/style.css rename to plugin-test/css-extract/cases/export-only-locals-commonjs/style.css diff --git a/packages/rspack/tests/cssExtract/cases/export-only-locals-commonjs/webpack.config.js b/plugin-test/css-extract/cases/export-only-locals-commonjs/webpack.config.js similarity index 88% rename from packages/rspack/tests/cssExtract/cases/export-only-locals-commonjs/webpack.config.js rename to plugin-test/css-extract/cases/export-only-locals-commonjs/webpack.config.js index bd4dd9dad35..da449127969 100644 --- a/packages/rspack/tests/cssExtract/cases/export-only-locals-commonjs/webpack.config.js +++ b/plugin-test/css-extract/cases/export-only-locals-commonjs/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/export-only-locals/expected/main.js b/plugin-test/css-extract/cases/export-only-locals/expected/main.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/export-only-locals/expected/main.js rename to plugin-test/css-extract/cases/export-only-locals/expected/main.js diff --git a/packages/rspack/tests/cssExtract/cases/export-only-locals/index.js b/plugin-test/css-extract/cases/export-only-locals/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/export-only-locals/index.js rename to plugin-test/css-extract/cases/export-only-locals/index.js diff --git a/packages/rspack/tests/cssExtract/cases/export-only-locals/style.css b/plugin-test/css-extract/cases/export-only-locals/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/export-only-locals/style.css rename to plugin-test/css-extract/cases/export-only-locals/style.css diff --git a/packages/rspack/tests/cssExtract/cases/export-only-locals/webpack.config.js b/plugin-test/css-extract/cases/export-only-locals/webpack.config.js similarity index 87% rename from packages/rspack/tests/cssExtract/cases/export-only-locals/webpack.config.js rename to plugin-test/css-extract/cases/export-only-locals/webpack.config.js index e4cc416431a..05d7c819609 100644 --- a/packages/rspack/tests/cssExtract/cases/export-only-locals/webpack.config.js +++ b/plugin-test/css-extract/cases/export-only-locals/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/file-loader/expected/main.css b/plugin-test/css-extract/cases/file-loader/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/file-loader/expected/main.css rename to plugin-test/css-extract/cases/file-loader/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/file-loader/index.js b/plugin-test/css-extract/cases/file-loader/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/file-loader/index.js rename to plugin-test/css-extract/cases/file-loader/index.js diff --git a/packages/rspack/tests/cssExtract/cases/file-loader/react.svg b/plugin-test/css-extract/cases/file-loader/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/file-loader/react.svg rename to plugin-test/css-extract/cases/file-loader/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/file-loader/style.css b/plugin-test/css-extract/cases/file-loader/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/file-loader/style.css rename to plugin-test/css-extract/cases/file-loader/style.css diff --git a/packages/rspack/tests/cssExtract/cases/file-loader/webpack.config.js b/plugin-test/css-extract/cases/file-loader/webpack.config.js similarity index 89% rename from packages/rspack/tests/cssExtract/cases/file-loader/webpack.config.js rename to plugin-test/css-extract/cases/file-loader/webpack.config.js index 2f9f0000edc..f2d3d43e39d 100644 --- a/packages/rspack/tests/cssExtract/cases/file-loader/webpack.config.js +++ b/plugin-test/css-extract/cases/file-loader/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/filename-as-function/expected/demo/css/main.css b/plugin-test/css-extract/cases/filename-as-function/expected/demo/css/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/filename-as-function/expected/demo/css/main.css rename to plugin-test/css-extract/cases/filename-as-function/expected/demo/css/main.css diff --git a/packages/rspack/tests/cssExtract/cases/filename-as-function/index.js b/plugin-test/css-extract/cases/filename-as-function/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/filename-as-function/index.js rename to plugin-test/css-extract/cases/filename-as-function/index.js diff --git a/packages/rspack/tests/cssExtract/cases/filename-as-function/style.css b/plugin-test/css-extract/cases/filename-as-function/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/filename-as-function/style.css rename to plugin-test/css-extract/cases/filename-as-function/style.css diff --git a/packages/rspack/tests/cssExtract/cases/filename-as-function/webpack.config.js b/plugin-test/css-extract/cases/filename-as-function/webpack.config.js similarity index 85% rename from packages/rspack/tests/cssExtract/cases/filename-as-function/webpack.config.js rename to plugin-test/css-extract/cases/filename-as-function/webpack.config.js index 41e041f9589..024452b8c3e 100644 --- a/packages/rspack/tests/cssExtract/cases/filename-as-function/webpack.config.js +++ b/plugin-test/css-extract/cases/filename-as-function/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: { diff --git a/packages/rspack/tests/cssExtract/cases/filename-with-template/async.css b/plugin-test/css-extract/cases/filename-with-template/async.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/filename-with-template/async.css rename to plugin-test/css-extract/cases/filename-with-template/async.css diff --git a/packages/rspack/tests/cssExtract/cases/filename-with-template/expected/async.css b/plugin-test/css-extract/cases/filename-with-template/expected/async.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/filename-with-template/expected/async.css rename to plugin-test/css-extract/cases/filename-with-template/expected/async.css diff --git a/packages/rspack/tests/cssExtract/cases/filename-with-template/expected/main.css b/plugin-test/css-extract/cases/filename-with-template/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/filename-with-template/expected/main.css rename to plugin-test/css-extract/cases/filename-with-template/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/filename-with-template/index.js b/plugin-test/css-extract/cases/filename-with-template/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/filename-with-template/index.js rename to plugin-test/css-extract/cases/filename-with-template/index.js diff --git a/packages/rspack/tests/cssExtract/cases/filename-with-template/style.css b/plugin-test/css-extract/cases/filename-with-template/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/filename-with-template/style.css rename to plugin-test/css-extract/cases/filename-with-template/style.css diff --git a/plugin-test/css-extract/cases/filename-with-template/webpack.config.js b/plugin-test/css-extract/cases/filename-with-template/webpack.config.js new file mode 100644 index 00000000000..bc1745072da --- /dev/null +++ b/plugin-test/css-extract/cases/filename-with-template/webpack.config.js @@ -0,0 +1,18 @@ +const { CssExtractRspackPlugin } = require("@rspack/core"); + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [CssExtractRspackPlugin.loader, "css-loader"] + } + ] + }, + plugins: [ + new CssExtractRspackPlugin({ + filename: "[name].css" + }) + ] +}; diff --git a/packages/rspack/tests/cssExtract/cases/filename-without-template/async.css b/plugin-test/css-extract/cases/filename-without-template/async.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/filename-without-template/async.css rename to plugin-test/css-extract/cases/filename-without-template/async.css diff --git a/packages/rspack/tests/cssExtract/cases/filename-without-template/expected/async.main.css b/plugin-test/css-extract/cases/filename-without-template/expected/async.main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/filename-without-template/expected/async.main.css rename to plugin-test/css-extract/cases/filename-without-template/expected/async.main.css diff --git a/packages/rspack/tests/cssExtract/cases/filename-without-template/expected/main.css b/plugin-test/css-extract/cases/filename-without-template/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/filename-without-template/expected/main.css rename to plugin-test/css-extract/cases/filename-without-template/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/filename-without-template/index.js b/plugin-test/css-extract/cases/filename-without-template/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/filename-without-template/index.js rename to plugin-test/css-extract/cases/filename-without-template/index.js diff --git a/packages/rspack/tests/cssExtract/cases/filename-without-template/style.css b/plugin-test/css-extract/cases/filename-without-template/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/filename-without-template/style.css rename to plugin-test/css-extract/cases/filename-without-template/style.css diff --git a/packages/rspack/tests/cssExtract/cases/filename-without-template/webpack.config.js b/plugin-test/css-extract/cases/filename-without-template/webpack.config.js similarity index 81% rename from packages/rspack/tests/cssExtract/cases/filename-without-template/webpack.config.js rename to plugin-test/css-extract/cases/filename-without-template/webpack.config.js index 771e440441a..9e73159565f 100644 --- a/packages/rspack/tests/cssExtract/cases/filename-without-template/webpack.config.js +++ b/plugin-test/css-extract/cases/filename-without-template/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/hmr/a.css b/plugin-test/css-extract/cases/hmr/a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/hmr/a.css rename to plugin-test/css-extract/cases/hmr/a.css diff --git a/packages/rspack/tests/cssExtract/cases/hmr/b.css b/plugin-test/css-extract/cases/hmr/b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/hmr/b.css rename to plugin-test/css-extract/cases/hmr/b.css diff --git a/packages/rspack/tests/cssExtract/cases/hmr/c.css b/plugin-test/css-extract/cases/hmr/c.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/hmr/c.css rename to plugin-test/css-extract/cases/hmr/c.css diff --git a/packages/rspack/tests/cssExtract/cases/hmr/expected/main.css b/plugin-test/css-extract/cases/hmr/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/hmr/expected/main.css rename to plugin-test/css-extract/cases/hmr/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/hmr/expected/main.js b/plugin-test/css-extract/cases/hmr/expected/main.js similarity index 98% rename from packages/rspack/tests/cssExtract/cases/hmr/expected/main.js rename to plugin-test/css-extract/cases/hmr/expected/main.js index fd410ffccc0..d735184144f 100644 --- a/packages/rspack/tests/cssExtract/cases/hmr/expected/main.js +++ b/plugin-test/css-extract/cases/hmr/expected/main.js @@ -1,12 +1,12 @@ (function() { var __webpack_modules__ = { -"../../../../dist/builtin-plugin/css-extract/hmr/hotModuleReplacement.js": (function (module, __unused_webpack_exports, __webpack_require__) { +"../../../../packages/rspack/dist/builtin-plugin/css-extract/hmr/hotModuleReplacement.js": (function (module, __unused_webpack_exports, __webpack_require__) { "use strict"; /* eslint-env browser */ /* eslint-disable no-console, func-names -*/ /** @typedef {any} TODO */ const normalizeUrl = __webpack_require__(/*! ./normalize-url */"../../../../dist/builtin-plugin/css-extract/hmr/normalize-url.js"); +*/ /** @typedef {any} TODO */ const normalizeUrl = __webpack_require__(/*! ./normalize-url */"../../../../packages/rspack/dist/builtin-plugin/css-extract/hmr/normalize-url.js"); const srcByModuleId = Object.create(null); const noDocument = typeof document === "undefined"; const { forEach } = Array.prototype; @@ -173,7 +173,7 @@ function reloadAll() { return debounce(update, 50); }; }), -"../../../../dist/builtin-plugin/css-extract/hmr/normalize-url.js": (function (module) { +"../../../../packages/rspack/dist/builtin-plugin/css-extract/hmr/normalize-url.js": (function (module) { "use strict"; /* eslint-disable */ /** * @param {string[]} pathComponents @@ -206,14 +206,14 @@ function reloadAll() { return protocol + host + path; }; }), -"./index.css?3a21": (function (module, __webpack_exports__, __webpack_require__) { +"./index.css?6fbf": (function (module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // extracted by css-extract-rspack-plugin if (true) { // - var cssReload = __webpack_require__(/*! ../../../../dist/builtin-plugin/css-extract/hmr/hotModuleReplacement.js */"../../../../dist/builtin-plugin/css-extract/hmr/hotModuleReplacement.js")(module.id, { + var cssReload = __webpack_require__(/*! ../../../../packages/rspack/dist/builtin-plugin/css-extract/hmr/hotModuleReplacement.js */"../../../../packages/rspack/dist/builtin-plugin/css-extract/hmr/hotModuleReplacement.js")(module.id, { "locals": false }); module.hot.dispose(cssReload); @@ -1387,5 +1387,5 @@ __webpack_require__.hmrM = function () { }; }(); -var __webpack_exports__ = __webpack_require__("./index.css?3a21"); +var __webpack_exports__ = __webpack_require__("./index.css?6fbf"); })() diff --git a/packages/rspack/tests/cssExtract/cases/hmr/index.css b/plugin-test/css-extract/cases/hmr/index.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/hmr/index.css rename to plugin-test/css-extract/cases/hmr/index.css diff --git a/packages/rspack/tests/cssExtract/cases/hmr/webpack.config.js b/plugin-test/css-extract/cases/hmr/webpack.config.js similarity index 93% rename from packages/rspack/tests/cssExtract/cases/hmr/webpack.config.js rename to plugin-test/css-extract/cases/hmr/webpack.config.js index bfece666e0c..dbf2e77173b 100644 --- a/packages/rspack/tests/cssExtract/cases/hmr/webpack.config.js +++ b/plugin-test/css-extract/cases/hmr/webpack.config.js @@ -1,7 +1,7 @@ const { CssExtractRspackPlugin, HotModuleReplacementPlugin -} = require("../../../../"); +} = require("@rspack/core"); module.exports = { entry: "./index.css", diff --git a/packages/rspack/tests/cssExtract/cases/ignore-other-loaders-2/expected/main.css b/plugin-test/css-extract/cases/ignore-other-loaders-2/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignore-other-loaders-2/expected/main.css rename to plugin-test/css-extract/cases/ignore-other-loaders-2/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/ignore-other-loaders-2/expected/other.ext b/plugin-test/css-extract/cases/ignore-other-loaders-2/expected/other.ext similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignore-other-loaders-2/expected/other.ext rename to plugin-test/css-extract/cases/ignore-other-loaders-2/expected/other.ext diff --git a/packages/rspack/tests/cssExtract/cases/ignore-other-loaders-2/index.js b/plugin-test/css-extract/cases/ignore-other-loaders-2/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignore-other-loaders-2/index.js rename to plugin-test/css-extract/cases/ignore-other-loaders-2/index.js diff --git a/packages/rspack/tests/cssExtract/cases/ignore-other-loaders-2/other.ext b/plugin-test/css-extract/cases/ignore-other-loaders-2/other.ext similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignore-other-loaders-2/other.ext rename to plugin-test/css-extract/cases/ignore-other-loaders-2/other.ext diff --git a/packages/rspack/tests/cssExtract/cases/ignore-other-loaders-2/style.css b/plugin-test/css-extract/cases/ignore-other-loaders-2/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignore-other-loaders-2/style.css rename to plugin-test/css-extract/cases/ignore-other-loaders-2/style.css diff --git a/packages/rspack/tests/cssExtract/cases/ignore-other-loaders-2/webpack.config.js b/plugin-test/css-extract/cases/ignore-other-loaders-2/webpack.config.js similarity index 88% rename from packages/rspack/tests/cssExtract/cases/ignore-other-loaders-2/webpack.config.js rename to plugin-test/css-extract/cases/ignore-other-loaders-2/webpack.config.js index 73446c3adee..b04324140c7 100644 --- a/packages/rspack/tests/cssExtract/cases/ignore-other-loaders-2/webpack.config.js +++ b/plugin-test/css-extract/cases/ignore-other-loaders-2/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/ignore-other-loaders/expected/main.css b/plugin-test/css-extract/cases/ignore-other-loaders/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignore-other-loaders/expected/main.css rename to plugin-test/css-extract/cases/ignore-other-loaders/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/ignore-other-loaders/index.js b/plugin-test/css-extract/cases/ignore-other-loaders/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignore-other-loaders/index.js rename to plugin-test/css-extract/cases/ignore-other-loaders/index.js diff --git a/packages/rspack/tests/cssExtract/cases/ignore-other-loaders/other.css b/plugin-test/css-extract/cases/ignore-other-loaders/other.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignore-other-loaders/other.css rename to plugin-test/css-extract/cases/ignore-other-loaders/other.css diff --git a/packages/rspack/tests/cssExtract/cases/ignore-other-loaders/style.css b/plugin-test/css-extract/cases/ignore-other-loaders/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignore-other-loaders/style.css rename to plugin-test/css-extract/cases/ignore-other-loaders/style.css diff --git a/packages/rspack/tests/cssExtract/cases/ignore-other-loaders/webpack.config.js b/plugin-test/css-extract/cases/ignore-other-loaders/webpack.config.js similarity index 82% rename from packages/rspack/tests/cssExtract/cases/ignore-other-loaders/webpack.config.js rename to plugin-test/css-extract/cases/ignore-other-loaders/webpack.config.js index 8b29f71b29e..47ba6919ccf 100644 --- a/packages/rspack/tests/cssExtract/cases/ignore-other-loaders/webpack.config.js +++ b/plugin-test/css-extract/cases/ignore-other-loaders/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrder/e1.css b/plugin-test/css-extract/cases/ignoreOrder/e1.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrder/e1.css rename to plugin-test/css-extract/cases/ignoreOrder/e1.css diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrder/e2.css b/plugin-test/css-extract/cases/ignoreOrder/e2.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrder/e2.css rename to plugin-test/css-extract/cases/ignoreOrder/e2.css diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrder/expected/styles.css b/plugin-test/css-extract/cases/ignoreOrder/expected/styles.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrder/expected/styles.css rename to plugin-test/css-extract/cases/ignoreOrder/expected/styles.css diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrder/index.js b/plugin-test/css-extract/cases/ignoreOrder/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrder/index.js rename to plugin-test/css-extract/cases/ignoreOrder/index.js diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrder/index2.js b/plugin-test/css-extract/cases/ignoreOrder/index2.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrder/index2.js rename to plugin-test/css-extract/cases/ignoreOrder/index2.js diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrder/webpack.config.js b/plugin-test/css-extract/cases/ignoreOrder/webpack.config.js similarity index 87% rename from packages/rspack/tests/cssExtract/cases/ignoreOrder/webpack.config.js rename to plugin-test/css-extract/cases/ignoreOrder/webpack.config.js index 4d50c70c0a2..3ac39168cc3 100644 --- a/packages/rspack/tests/cssExtract/cases/ignoreOrder/webpack.config.js +++ b/plugin-test/css-extract/cases/ignoreOrder/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: { diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrderFalse/e1.css b/plugin-test/css-extract/cases/ignoreOrderFalse/e1.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrderFalse/e1.css rename to plugin-test/css-extract/cases/ignoreOrderFalse/e1.css diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrderFalse/e2.css b/plugin-test/css-extract/cases/ignoreOrderFalse/e2.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrderFalse/e2.css rename to plugin-test/css-extract/cases/ignoreOrderFalse/e2.css diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrderFalse/e3.css b/plugin-test/css-extract/cases/ignoreOrderFalse/e3.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrderFalse/e3.css rename to plugin-test/css-extract/cases/ignoreOrderFalse/e3.css diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrderFalse/expected/styles.css b/plugin-test/css-extract/cases/ignoreOrderFalse/expected/styles.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrderFalse/expected/styles.css rename to plugin-test/css-extract/cases/ignoreOrderFalse/expected/styles.css diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrderFalse/index.js b/plugin-test/css-extract/cases/ignoreOrderFalse/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrderFalse/index.js rename to plugin-test/css-extract/cases/ignoreOrderFalse/index.js diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrderFalse/index2.js b/plugin-test/css-extract/cases/ignoreOrderFalse/index2.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrderFalse/index2.js rename to plugin-test/css-extract/cases/ignoreOrderFalse/index2.js diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrderFalse/index3.js b/plugin-test/css-extract/cases/ignoreOrderFalse/index3.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrderFalse/index3.js rename to plugin-test/css-extract/cases/ignoreOrderFalse/index3.js diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrderFalse/warnings.js b/plugin-test/css-extract/cases/ignoreOrderFalse/warnings.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrderFalse/warnings.js rename to plugin-test/css-extract/cases/ignoreOrderFalse/warnings.js diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrderFalse/webpack.config.js b/plugin-test/css-extract/cases/ignoreOrderFalse/webpack.config.js similarity index 88% rename from packages/rspack/tests/cssExtract/cases/ignoreOrderFalse/webpack.config.js rename to plugin-test/css-extract/cases/ignoreOrderFalse/webpack.config.js index ab0f2d360d4..386a3252e7f 100644 --- a/packages/rspack/tests/cssExtract/cases/ignoreOrderFalse/webpack.config.js +++ b/plugin-test/css-extract/cases/ignoreOrderFalse/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: { diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/e1.css b/plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/e1.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/e1.css rename to plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/e1.css diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/e2.css b/plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/e2.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/e2.css rename to plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/e2.css diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/e3.css b/plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/e3.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/e3.css rename to plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/e3.css diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/e4.css b/plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/e4.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/e4.css rename to plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/e4.css diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/expected/styles.css b/plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/expected/styles.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/expected/styles.css rename to plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/expected/styles.css diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/index.js b/plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/index.js rename to plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/index.js diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/index2.js b/plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/index2.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/index2.js rename to plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/index2.js diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/index3.js b/plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/index3.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/index3.js rename to plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/index3.js diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/index4.js b/plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/index4.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/index4.js rename to plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/index4.js diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/warnings.js b/plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/warnings.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/warnings.js rename to plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/warnings.js diff --git a/packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/webpack.config.js b/plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/webpack.config.js similarity index 89% rename from packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/webpack.config.js rename to plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/webpack.config.js index d6c39364ee5..94c76eb2946 100644 --- a/packages/rspack/tests/cssExtract/cases/ignoreOrderFalseWithoutGoodChunks/webpack.config.js +++ b/plugin-test/css-extract/cases/ignoreOrderFalseWithoutGoodChunks/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: { diff --git a/packages/rspack/tests/cssExtract/cases/import/a.css b/plugin-test/css-extract/cases/import/a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/import/a.css rename to plugin-test/css-extract/cases/import/a.css diff --git a/packages/rspack/tests/cssExtract/cases/import/b.css b/plugin-test/css-extract/cases/import/b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/import/b.css rename to plugin-test/css-extract/cases/import/b.css diff --git a/packages/rspack/tests/cssExtract/cases/import/c.css b/plugin-test/css-extract/cases/import/c.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/import/c.css rename to plugin-test/css-extract/cases/import/c.css diff --git a/packages/rspack/tests/cssExtract/cases/import/expected/main.css b/plugin-test/css-extract/cases/import/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/import/expected/main.css rename to plugin-test/css-extract/cases/import/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/import/index.js b/plugin-test/css-extract/cases/import/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/import/index.js rename to plugin-test/css-extract/cases/import/index.js diff --git a/plugin-test/css-extract/cases/import/webpack.config.js b/plugin-test/css-extract/cases/import/webpack.config.js new file mode 100644 index 00000000000..bc1745072da --- /dev/null +++ b/plugin-test/css-extract/cases/import/webpack.config.js @@ -0,0 +1,18 @@ +const { CssExtractRspackPlugin } = require("@rspack/core"); + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [CssExtractRspackPlugin.loader, "css-loader"] + } + ] + }, + plugins: [ + new CssExtractRspackPlugin({ + filename: "[name].css" + }) + ] +}; diff --git a/packages/rspack/tests/cssExtract/cases/insert-function/expected/main.js b/plugin-test/css-extract/cases/insert-function/expected/main.js similarity index 99% rename from packages/rspack/tests/cssExtract/cases/insert-function/expected/main.js rename to plugin-test/css-extract/cases/insert-function/expected/main.js index 9eb70c30117..a3c3e908acc 100644 --- a/packages/rspack/tests/cssExtract/cases/insert-function/expected/main.js +++ b/plugin-test/css-extract/cases/insert-function/expected/main.js @@ -2,7 +2,7 @@ var __webpack_modules__ = { "./src/index.js": (function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { /* eslint-env browser */ // eslint-disable-next-line -__webpack_require__.e("src_inject_css").then(__webpack_require__.bind(__webpack_require__, /*! ./inject.css */"./src/inject.css?a8da")); +__webpack_require__.e("src_inject_css").then(__webpack_require__.bind(__webpack_require__, /*! ./inject.css */"./src/inject.css?901b")); }), } diff --git a/packages/rspack/tests/cssExtract/cases/insert-function/expected/src_inject_css.css b/plugin-test/css-extract/cases/insert-function/expected/src_inject_css.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/insert-function/expected/src_inject_css.css rename to plugin-test/css-extract/cases/insert-function/expected/src_inject_css.css diff --git a/packages/rspack/tests/cssExtract/cases/insert-undefined/expected/src_inject_css.js b/plugin-test/css-extract/cases/insert-function/expected/src_inject_css.js similarity index 78% rename from packages/rspack/tests/cssExtract/cases/insert-undefined/expected/src_inject_css.js rename to plugin-test/css-extract/cases/insert-function/expected/src_inject_css.js index 0834dfc7b58..c9b64e45746 100644 --- a/packages/rspack/tests/cssExtract/cases/insert-undefined/expected/src_inject_css.js +++ b/plugin-test/css-extract/cases/insert-function/expected/src_inject_css.js @@ -1,5 +1,5 @@ (self['webpackChunk'] = self['webpackChunk'] || []).push([["src_inject_css"], { -"./src/inject.css?a8da": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { +"./src/inject.css?901b": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // extracted by css-extract-rspack-plugin diff --git a/packages/rspack/tests/cssExtract/cases/insert-function/src/index.js b/plugin-test/css-extract/cases/insert-function/src/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/insert-function/src/index.js rename to plugin-test/css-extract/cases/insert-function/src/index.js diff --git a/packages/rspack/tests/cssExtract/cases/insert-function/src/inject.css b/plugin-test/css-extract/cases/insert-function/src/inject.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/insert-function/src/inject.css rename to plugin-test/css-extract/cases/insert-function/src/inject.css diff --git a/packages/rspack/tests/cssExtract/cases/insert-function/webpack.config.js b/plugin-test/css-extract/cases/insert-function/webpack.config.js similarity index 90% rename from packages/rspack/tests/cssExtract/cases/insert-function/webpack.config.js rename to plugin-test/css-extract/cases/insert-function/webpack.config.js index 3aa82683114..653bc8d13ef 100644 --- a/packages/rspack/tests/cssExtract/cases/insert-function/webpack.config.js +++ b/plugin-test/css-extract/cases/insert-function/webpack.config.js @@ -1,6 +1,6 @@ /* global document */ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { module: { diff --git a/packages/rspack/tests/cssExtract/cases/insert-string/expected/main.js b/plugin-test/css-extract/cases/insert-string/expected/main.js similarity index 99% rename from packages/rspack/tests/cssExtract/cases/insert-string/expected/main.js rename to plugin-test/css-extract/cases/insert-string/expected/main.js index e9027569d7e..f371f7167b1 100644 --- a/packages/rspack/tests/cssExtract/cases/insert-string/expected/main.js +++ b/plugin-test/css-extract/cases/insert-string/expected/main.js @@ -2,7 +2,7 @@ var __webpack_modules__ = { "./src/index.js": (function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { /* eslint-env browser */ // eslint-disable-next-line -__webpack_require__.e("src_inject_css").then(__webpack_require__.bind(__webpack_require__, /*! ./inject.css */"./src/inject.css?a8da")); +__webpack_require__.e("src_inject_css").then(__webpack_require__.bind(__webpack_require__, /*! ./inject.css */"./src/inject.css?901b")); }), } diff --git a/packages/rspack/tests/cssExtract/cases/insert-string/expected/src_inject_css.css b/plugin-test/css-extract/cases/insert-string/expected/src_inject_css.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/insert-string/expected/src_inject_css.css rename to plugin-test/css-extract/cases/insert-string/expected/src_inject_css.css diff --git a/packages/rspack/tests/cssExtract/cases/insert-string/expected/src_inject_css.js b/plugin-test/css-extract/cases/insert-string/expected/src_inject_css.js similarity index 78% rename from packages/rspack/tests/cssExtract/cases/insert-string/expected/src_inject_css.js rename to plugin-test/css-extract/cases/insert-string/expected/src_inject_css.js index 0834dfc7b58..c9b64e45746 100644 --- a/packages/rspack/tests/cssExtract/cases/insert-string/expected/src_inject_css.js +++ b/plugin-test/css-extract/cases/insert-string/expected/src_inject_css.js @@ -1,5 +1,5 @@ (self['webpackChunk'] = self['webpackChunk'] || []).push([["src_inject_css"], { -"./src/inject.css?a8da": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { +"./src/inject.css?901b": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // extracted by css-extract-rspack-plugin diff --git a/packages/rspack/tests/cssExtract/cases/insert-string/src/index.js b/plugin-test/css-extract/cases/insert-string/src/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/insert-string/src/index.js rename to plugin-test/css-extract/cases/insert-string/src/index.js diff --git a/packages/rspack/tests/cssExtract/cases/insert-string/src/inject.css b/plugin-test/css-extract/cases/insert-string/src/inject.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/insert-string/src/inject.css rename to plugin-test/css-extract/cases/insert-string/src/inject.css diff --git a/packages/rspack/tests/cssExtract/cases/insert-string/webpack.config.js b/plugin-test/css-extract/cases/insert-string/webpack.config.js similarity index 85% rename from packages/rspack/tests/cssExtract/cases/insert-string/webpack.config.js rename to plugin-test/css-extract/cases/insert-string/webpack.config.js index 2d0e68a5002..b9d0bea80ed 100644 --- a/packages/rspack/tests/cssExtract/cases/insert-string/webpack.config.js +++ b/plugin-test/css-extract/cases/insert-string/webpack.config.js @@ -1,6 +1,6 @@ /* global document */ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { module: { diff --git a/packages/rspack/tests/cssExtract/cases/insert-undefined/expected/main.js b/plugin-test/css-extract/cases/insert-undefined/expected/main.js similarity index 99% rename from packages/rspack/tests/cssExtract/cases/insert-undefined/expected/main.js rename to plugin-test/css-extract/cases/insert-undefined/expected/main.js index 8d4262ea32e..a157e5d6123 100644 --- a/packages/rspack/tests/cssExtract/cases/insert-undefined/expected/main.js +++ b/plugin-test/css-extract/cases/insert-undefined/expected/main.js @@ -2,7 +2,7 @@ var __webpack_modules__ = { "./src/index.js": (function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { /* eslint-env browser */ // eslint-disable-next-line -__webpack_require__.e("src_inject_css").then(__webpack_require__.bind(__webpack_require__, /*! ./inject.css */"./src/inject.css?a8da")); +__webpack_require__.e("src_inject_css").then(__webpack_require__.bind(__webpack_require__, /*! ./inject.css */"./src/inject.css?901b")); }), } diff --git a/packages/rspack/tests/cssExtract/cases/insert-undefined/expected/src_inject_css.css b/plugin-test/css-extract/cases/insert-undefined/expected/src_inject_css.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/insert-undefined/expected/src_inject_css.css rename to plugin-test/css-extract/cases/insert-undefined/expected/src_inject_css.css diff --git a/packages/rspack/tests/cssExtract/cases/insert-function/expected/src_inject_css.js b/plugin-test/css-extract/cases/insert-undefined/expected/src_inject_css.js similarity index 78% rename from packages/rspack/tests/cssExtract/cases/insert-function/expected/src_inject_css.js rename to plugin-test/css-extract/cases/insert-undefined/expected/src_inject_css.js index 0834dfc7b58..c9b64e45746 100644 --- a/packages/rspack/tests/cssExtract/cases/insert-function/expected/src_inject_css.js +++ b/plugin-test/css-extract/cases/insert-undefined/expected/src_inject_css.js @@ -1,5 +1,5 @@ (self['webpackChunk'] = self['webpackChunk'] || []).push([["src_inject_css"], { -"./src/inject.css?a8da": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { +"./src/inject.css?901b": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // extracted by css-extract-rspack-plugin diff --git a/packages/rspack/tests/cssExtract/cases/insert-undefined/src/index.js b/plugin-test/css-extract/cases/insert-undefined/src/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/insert-undefined/src/index.js rename to plugin-test/css-extract/cases/insert-undefined/src/index.js diff --git a/packages/rspack/tests/cssExtract/cases/insert-undefined/src/inject.css b/plugin-test/css-extract/cases/insert-undefined/src/inject.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/insert-undefined/src/inject.css rename to plugin-test/css-extract/cases/insert-undefined/src/inject.css diff --git a/packages/rspack/tests/cssExtract/cases/insert-undefined/webpack.config.js b/plugin-test/css-extract/cases/insert-undefined/webpack.config.js similarity index 84% rename from packages/rspack/tests/cssExtract/cases/insert-undefined/webpack.config.js rename to plugin-test/css-extract/cases/insert-undefined/webpack.config.js index afc7bd49609..fc7d0963d74 100644 --- a/packages/rspack/tests/cssExtract/cases/insert-undefined/webpack.config.js +++ b/plugin-test/css-extract/cases/insert-undefined/webpack.config.js @@ -1,6 +1,6 @@ /* global document */ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { module: { diff --git a/packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-1/dark.css b/plugin-test/css-extract/cases/issue-css-loader-1503-1/dark.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-1/dark.css rename to plugin-test/css-extract/cases/issue-css-loader-1503-1/dark.css diff --git a/packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-1/expected/dark.css b/plugin-test/css-extract/cases/issue-css-loader-1503-1/expected/dark.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-1/expected/dark.css rename to plugin-test/css-extract/cases/issue-css-loader-1503-1/expected/dark.css diff --git a/packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-1/expected/index.css b/plugin-test/css-extract/cases/issue-css-loader-1503-1/expected/index.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-1/expected/index.css rename to plugin-test/css-extract/cases/issue-css-loader-1503-1/expected/index.css diff --git a/packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-1/index.css b/plugin-test/css-extract/cases/issue-css-loader-1503-1/index.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-1/index.css rename to plugin-test/css-extract/cases/issue-css-loader-1503-1/index.css diff --git a/packages/rspack/tests/cssExtract/cases/issue-css-loader-1503/webpack.config.js b/plugin-test/css-extract/cases/issue-css-loader-1503-1/webpack.config.js similarity index 86% rename from packages/rspack/tests/cssExtract/cases/issue-css-loader-1503/webpack.config.js rename to plugin-test/css-extract/cases/issue-css-loader-1503-1/webpack.config.js index 41a4643d8f4..83eb5367979 100644 --- a/packages/rspack/tests/cssExtract/cases/issue-css-loader-1503/webpack.config.js +++ b/plugin-test/css-extract/cases/issue-css-loader-1503-1/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: { diff --git a/packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-2/dark.css b/plugin-test/css-extract/cases/issue-css-loader-1503-2/dark.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-2/dark.css rename to plugin-test/css-extract/cases/issue-css-loader-1503-2/dark.css diff --git a/packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-2/expected/dark.css b/plugin-test/css-extract/cases/issue-css-loader-1503-2/expected/dark.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-2/expected/dark.css rename to plugin-test/css-extract/cases/issue-css-loader-1503-2/expected/dark.css diff --git a/packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-2/expected/index.css b/plugin-test/css-extract/cases/issue-css-loader-1503-2/expected/index.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-2/expected/index.css rename to plugin-test/css-extract/cases/issue-css-loader-1503-2/expected/index.css diff --git a/packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-2/index.css b/plugin-test/css-extract/cases/issue-css-loader-1503-2/index.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-2/index.css rename to plugin-test/css-extract/cases/issue-css-loader-1503-2/index.css diff --git a/packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-2/test.filter.js b/plugin-test/css-extract/cases/issue-css-loader-1503-2/test.filter.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-2/test.filter.js rename to plugin-test/css-extract/cases/issue-css-loader-1503-2/test.filter.js diff --git a/packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-1/webpack.config.js b/plugin-test/css-extract/cases/issue-css-loader-1503-2/webpack.config.js similarity index 86% rename from packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-1/webpack.config.js rename to plugin-test/css-extract/cases/issue-css-loader-1503-2/webpack.config.js index 41a4643d8f4..83eb5367979 100644 --- a/packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-1/webpack.config.js +++ b/plugin-test/css-extract/cases/issue-css-loader-1503-2/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: { diff --git a/packages/rspack/tests/cssExtract/cases/issue-css-loader-1503/dark.css b/plugin-test/css-extract/cases/issue-css-loader-1503/dark.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/issue-css-loader-1503/dark.css rename to plugin-test/css-extract/cases/issue-css-loader-1503/dark.css diff --git a/packages/rspack/tests/cssExtract/cases/issue-css-loader-1503/expected/dark.css b/plugin-test/css-extract/cases/issue-css-loader-1503/expected/dark.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/issue-css-loader-1503/expected/dark.css rename to plugin-test/css-extract/cases/issue-css-loader-1503/expected/dark.css diff --git a/packages/rspack/tests/cssExtract/cases/issue-css-loader-1503/expected/index.css b/plugin-test/css-extract/cases/issue-css-loader-1503/expected/index.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/issue-css-loader-1503/expected/index.css rename to plugin-test/css-extract/cases/issue-css-loader-1503/expected/index.css diff --git a/packages/rspack/tests/cssExtract/cases/issue-css-loader-1503/index.css b/plugin-test/css-extract/cases/issue-css-loader-1503/index.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/issue-css-loader-1503/index.css rename to plugin-test/css-extract/cases/issue-css-loader-1503/index.css diff --git a/packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-2/webpack.config.js b/plugin-test/css-extract/cases/issue-css-loader-1503/webpack.config.js similarity index 86% rename from packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-2/webpack.config.js rename to plugin-test/css-extract/cases/issue-css-loader-1503/webpack.config.js index 41a4643d8f4..83eb5367979 100644 --- a/packages/rspack/tests/cssExtract/cases/issue-css-loader-1503-2/webpack.config.js +++ b/plugin-test/css-extract/cases/issue-css-loader-1503/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: { diff --git a/packages/rspack/tests/cssExtract/cases/js-hash/expected/style.$59392d4d94762f990e9ea8dfa94f9c34$.1.css b/plugin-test/css-extract/cases/js-hash/expected/style.$59392d4d94762f990e9ea8dfa94f9c34$.1.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/js-hash/expected/style.$59392d4d94762f990e9ea8dfa94f9c34$.1.css rename to plugin-test/css-extract/cases/js-hash/expected/style.$59392d4d94762f990e9ea8dfa94f9c34$.1.css diff --git a/packages/rspack/tests/cssExtract/cases/js-hash/expected/style.$8962f7751ac742a81f8cd8ef907bc50a$.2.css b/plugin-test/css-extract/cases/js-hash/expected/style.$8962f7751ac742a81f8cd8ef907bc50a$.2.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/js-hash/expected/style.$8962f7751ac742a81f8cd8ef907bc50a$.2.css rename to plugin-test/css-extract/cases/js-hash/expected/style.$8962f7751ac742a81f8cd8ef907bc50a$.2.css diff --git a/packages/rspack/tests/cssExtract/cases/js-hash/index.js b/plugin-test/css-extract/cases/js-hash/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/js-hash/index.js rename to plugin-test/css-extract/cases/js-hash/index.js diff --git a/packages/rspack/tests/cssExtract/cases/js-hash/loader.js b/plugin-test/css-extract/cases/js-hash/loader.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/js-hash/loader.js rename to plugin-test/css-extract/cases/js-hash/loader.js diff --git a/packages/rspack/tests/cssExtract/cases/js-hash/style.css b/plugin-test/css-extract/cases/js-hash/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/js-hash/style.css rename to plugin-test/css-extract/cases/js-hash/style.css diff --git a/packages/rspack/tests/cssExtract/cases/js-hash/webpack.config.js b/plugin-test/css-extract/cases/js-hash/webpack.config.js similarity index 90% rename from packages/rspack/tests/cssExtract/cases/js-hash/webpack.config.js rename to plugin-test/css-extract/cases/js-hash/webpack.config.js index be201fe401b..1b110a59cb9 100644 --- a/packages/rspack/tests/cssExtract/cases/js-hash/webpack.config.js +++ b/plugin-test/css-extract/cases/js-hash/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = [1, 2].map(n => { return { diff --git a/packages/rspack/tests/cssExtract/cases/moduleFilenameMutableFilename/expected/mutated.css b/plugin-test/css-extract/cases/moduleFilenameMutableFilename/expected/mutated.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/moduleFilenameMutableFilename/expected/mutated.css rename to plugin-test/css-extract/cases/moduleFilenameMutableFilename/expected/mutated.css diff --git a/packages/rspack/tests/cssExtract/cases/moduleFilenameMutableFilename/index.js b/plugin-test/css-extract/cases/moduleFilenameMutableFilename/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/moduleFilenameMutableFilename/index.js rename to plugin-test/css-extract/cases/moduleFilenameMutableFilename/index.js diff --git a/packages/rspack/tests/cssExtract/cases/moduleFilenameMutableFilename/style.css b/plugin-test/css-extract/cases/moduleFilenameMutableFilename/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/moduleFilenameMutableFilename/style.css rename to plugin-test/css-extract/cases/moduleFilenameMutableFilename/style.css diff --git a/packages/rspack/tests/cssExtract/cases/moduleFilenameMutableFilename/webpack.config.js b/plugin-test/css-extract/cases/moduleFilenameMutableFilename/webpack.config.js similarity index 86% rename from packages/rspack/tests/cssExtract/cases/moduleFilenameMutableFilename/webpack.config.js rename to plugin-test/css-extract/cases/moduleFilenameMutableFilename/webpack.config.js index 3f3b8dd157d..c6191b012f7 100644 --- a/packages/rspack/tests/cssExtract/cases/moduleFilenameMutableFilename/webpack.config.js +++ b/plugin-test/css-extract/cases/moduleFilenameMutableFilename/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: { diff --git a/packages/rspack/tests/cssExtract/cases/multiple-compiler/expected/one-main.js b/plugin-test/css-extract/cases/multiple-compiler/expected/one-main.js similarity index 91% rename from packages/rspack/tests/cssExtract/cases/multiple-compiler/expected/one-main.js rename to plugin-test/css-extract/cases/multiple-compiler/expected/one-main.js index bd5681b7664..c4796d20f69 100644 --- a/packages/rspack/tests/cssExtract/cases/multiple-compiler/expected/one-main.js +++ b/plugin-test/css-extract/cases/multiple-compiler/expected/one-main.js @@ -1,6 +1,6 @@ (function() { var __webpack_modules__ = { -"./style.css?76f1": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { +"./style.css?b16f": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // extracted by css-extract-rspack-plugin @@ -9,7 +9,7 @@ __webpack_require__.r(__webpack_exports__); "./index.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.css */"./style.css?76f1"); +/* harmony import */var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.css */"./style.css?b16f"); }), diff --git a/packages/rspack/tests/cssExtract/cases/multiple-compiler/expected/one/main.css b/plugin-test/css-extract/cases/multiple-compiler/expected/one/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-compiler/expected/one/main.css rename to plugin-test/css-extract/cases/multiple-compiler/expected/one/main.css diff --git a/packages/rspack/tests/cssExtract/cases/multiple-compiler/expected/two-main.js b/plugin-test/css-extract/cases/multiple-compiler/expected/two-main.js similarity index 91% rename from packages/rspack/tests/cssExtract/cases/multiple-compiler/expected/two-main.js rename to plugin-test/css-extract/cases/multiple-compiler/expected/two-main.js index bd5681b7664..c4796d20f69 100644 --- a/packages/rspack/tests/cssExtract/cases/multiple-compiler/expected/two-main.js +++ b/plugin-test/css-extract/cases/multiple-compiler/expected/two-main.js @@ -1,6 +1,6 @@ (function() { var __webpack_modules__ = { -"./style.css?76f1": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { +"./style.css?b16f": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // extracted by css-extract-rspack-plugin @@ -9,7 +9,7 @@ __webpack_require__.r(__webpack_exports__); "./index.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.css */"./style.css?76f1"); +/* harmony import */var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.css */"./style.css?b16f"); }), diff --git a/packages/rspack/tests/cssExtract/cases/multiple-compiler/expected/two/main.css b/plugin-test/css-extract/cases/multiple-compiler/expected/two/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-compiler/expected/two/main.css rename to plugin-test/css-extract/cases/multiple-compiler/expected/two/main.css diff --git a/packages/rspack/tests/cssExtract/cases/multiple-compiler/index.js b/plugin-test/css-extract/cases/multiple-compiler/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-compiler/index.js rename to plugin-test/css-extract/cases/multiple-compiler/index.js diff --git a/packages/rspack/tests/cssExtract/cases/multiple-compiler/style.css b/plugin-test/css-extract/cases/multiple-compiler/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-compiler/style.css rename to plugin-test/css-extract/cases/multiple-compiler/style.css diff --git a/packages/rspack/tests/cssExtract/cases/multiple-compiler/webpack.config.js b/plugin-test/css-extract/cases/multiple-compiler/webpack.config.js similarity index 90% rename from packages/rspack/tests/cssExtract/cases/multiple-compiler/webpack.config.js rename to plugin-test/css-extract/cases/multiple-compiler/webpack.config.js index 890cf62733c..ab37d0756b1 100644 --- a/packages/rspack/tests/cssExtract/cases/multiple-compiler/webpack.config.js +++ b/plugin-test/css-extract/cases/multiple-compiler/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = [ { diff --git a/packages/rspack/tests/cssExtract/cases/multiple-entry/a.css b/plugin-test/css-extract/cases/multiple-entry/a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-entry/a.css rename to plugin-test/css-extract/cases/multiple-entry/a.css diff --git a/packages/rspack/tests/cssExtract/cases/multiple-entry/async-one.js b/plugin-test/css-extract/cases/multiple-entry/async-one.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-entry/async-one.js rename to plugin-test/css-extract/cases/multiple-entry/async-one.js diff --git a/packages/rspack/tests/cssExtract/cases/multiple-entry/async-two.js b/plugin-test/css-extract/cases/multiple-entry/async-two.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-entry/async-two.js rename to plugin-test/css-extract/cases/multiple-entry/async-two.js diff --git a/packages/rspack/tests/cssExtract/cases/multiple-entry/b.css b/plugin-test/css-extract/cases/multiple-entry/b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-entry/b.css rename to plugin-test/css-extract/cases/multiple-entry/b.css diff --git a/packages/rspack/tests/cssExtract/cases/multiple-entry/c.css b/plugin-test/css-extract/cases/multiple-entry/c.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-entry/c.css rename to plugin-test/css-extract/cases/multiple-entry/c.css diff --git a/packages/rspack/tests/cssExtract/cases/multiple-entry/d.css b/plugin-test/css-extract/cases/multiple-entry/d.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-entry/d.css rename to plugin-test/css-extract/cases/multiple-entry/d.css diff --git a/packages/rspack/tests/cssExtract/cases/multiple-entry/expected/async-one.css b/plugin-test/css-extract/cases/multiple-entry/expected/async-one.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-entry/expected/async-one.css rename to plugin-test/css-extract/cases/multiple-entry/expected/async-one.css diff --git a/packages/rspack/tests/cssExtract/cases/multiple-entry/expected/async-two.css b/plugin-test/css-extract/cases/multiple-entry/expected/async-two.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-entry/expected/async-two.css rename to plugin-test/css-extract/cases/multiple-entry/expected/async-two.css diff --git a/packages/rspack/tests/cssExtract/cases/multiple-entry/expected/main-one.css b/plugin-test/css-extract/cases/multiple-entry/expected/main-one.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-entry/expected/main-one.css rename to plugin-test/css-extract/cases/multiple-entry/expected/main-one.css diff --git a/packages/rspack/tests/cssExtract/cases/multiple-entry/expected/main-two.css b/plugin-test/css-extract/cases/multiple-entry/expected/main-two.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-entry/expected/main-two.css rename to plugin-test/css-extract/cases/multiple-entry/expected/main-two.css diff --git a/packages/rspack/tests/cssExtract/cases/multiple-entry/index-one.js b/plugin-test/css-extract/cases/multiple-entry/index-one.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-entry/index-one.js rename to plugin-test/css-extract/cases/multiple-entry/index-one.js diff --git a/packages/rspack/tests/cssExtract/cases/multiple-entry/index-two.js b/plugin-test/css-extract/cases/multiple-entry/index-two.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-entry/index-two.js rename to plugin-test/css-extract/cases/multiple-entry/index-two.js diff --git a/packages/rspack/tests/cssExtract/cases/multiple-entry/webpack.config.js b/plugin-test/css-extract/cases/multiple-entry/webpack.config.js similarity index 82% rename from packages/rspack/tests/cssExtract/cases/multiple-entry/webpack.config.js rename to plugin-test/css-extract/cases/multiple-entry/webpack.config.js index 2bc2bfe6d61..03dd01f9944 100644 --- a/packages/rspack/tests/cssExtract/cases/multiple-entry/webpack.config.js +++ b/plugin-test/css-extract/cases/multiple-entry/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: { diff --git a/packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading-with-default-light/expected/dark.css b/plugin-test/css-extract/cases/multiple-themes-async-loading-with-default-light/expected/dark.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading-with-default-light/expected/dark.css rename to plugin-test/css-extract/cases/multiple-themes-async-loading-with-default-light/expected/dark.css diff --git a/packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading-with-default-light/expected/main.css b/plugin-test/css-extract/cases/multiple-themes-async-loading-with-default-light/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading-with-default-light/expected/main.css rename to plugin-test/css-extract/cases/multiple-themes-async-loading-with-default-light/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading-with-default-light/public/index.html b/plugin-test/css-extract/cases/multiple-themes-async-loading-with-default-light/public/index.html similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading-with-default-light/public/index.html rename to plugin-test/css-extract/cases/multiple-themes-async-loading-with-default-light/public/index.html diff --git a/packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading-with-default-light/src/dark-theme/_vars.scss b/plugin-test/css-extract/cases/multiple-themes-async-loading-with-default-light/src/dark-theme/_vars.scss similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading-with-default-light/src/dark-theme/_vars.scss rename to plugin-test/css-extract/cases/multiple-themes-async-loading-with-default-light/src/dark-theme/_vars.scss diff --git a/packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading-with-default-light/src/index.js b/plugin-test/css-extract/cases/multiple-themes-async-loading-with-default-light/src/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading-with-default-light/src/index.js rename to plugin-test/css-extract/cases/multiple-themes-async-loading-with-default-light/src/index.js diff --git a/packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading-with-default-light/src/light-theme/_vars.scss b/plugin-test/css-extract/cases/multiple-themes-async-loading-with-default-light/src/light-theme/_vars.scss similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading-with-default-light/src/light-theme/_vars.scss rename to plugin-test/css-extract/cases/multiple-themes-async-loading-with-default-light/src/light-theme/_vars.scss diff --git a/packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading-with-default-light/src/style.scss b/plugin-test/css-extract/cases/multiple-themes-async-loading-with-default-light/src/style.scss similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading-with-default-light/src/style.scss rename to plugin-test/css-extract/cases/multiple-themes-async-loading-with-default-light/src/style.scss diff --git a/packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading/webpack.config.js b/plugin-test/css-extract/cases/multiple-themes-async-loading-with-default-light/webpack.config.js similarity index 92% rename from packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading/webpack.config.js rename to plugin-test/css-extract/cases/multiple-themes-async-loading-with-default-light/webpack.config.js index ac3aaa756e9..b51ae24c927 100644 --- a/packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading/webpack.config.js +++ b/plugin-test/css-extract/cases/multiple-themes-async-loading-with-default-light/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./src/index.js", diff --git a/packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading/expected/dark.css b/plugin-test/css-extract/cases/multiple-themes-async-loading/expected/dark.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading/expected/dark.css rename to plugin-test/css-extract/cases/multiple-themes-async-loading/expected/dark.css diff --git a/packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading/expected/light.css b/plugin-test/css-extract/cases/multiple-themes-async-loading/expected/light.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading/expected/light.css rename to plugin-test/css-extract/cases/multiple-themes-async-loading/expected/light.css diff --git a/packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading/public/index.html b/plugin-test/css-extract/cases/multiple-themes-async-loading/public/index.html similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading/public/index.html rename to plugin-test/css-extract/cases/multiple-themes-async-loading/public/index.html diff --git a/packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading/src/dark-theme/_vars.scss b/plugin-test/css-extract/cases/multiple-themes-async-loading/src/dark-theme/_vars.scss similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading/src/dark-theme/_vars.scss rename to plugin-test/css-extract/cases/multiple-themes-async-loading/src/dark-theme/_vars.scss diff --git a/packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading/src/index.js b/plugin-test/css-extract/cases/multiple-themes-async-loading/src/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading/src/index.js rename to plugin-test/css-extract/cases/multiple-themes-async-loading/src/index.js diff --git a/packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading/src/light-theme/_vars.scss b/plugin-test/css-extract/cases/multiple-themes-async-loading/src/light-theme/_vars.scss similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading/src/light-theme/_vars.scss rename to plugin-test/css-extract/cases/multiple-themes-async-loading/src/light-theme/_vars.scss diff --git a/packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading/src/style.scss b/plugin-test/css-extract/cases/multiple-themes-async-loading/src/style.scss similarity index 100% rename from packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading/src/style.scss rename to plugin-test/css-extract/cases/multiple-themes-async-loading/src/style.scss diff --git a/packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading-with-default-light/webpack.config.js b/plugin-test/css-extract/cases/multiple-themes-async-loading/webpack.config.js similarity index 92% rename from packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading-with-default-light/webpack.config.js rename to plugin-test/css-extract/cases/multiple-themes-async-loading/webpack.config.js index ac3aaa756e9..b51ae24c927 100644 --- a/packages/rspack/tests/cssExtract/cases/multiple-themes-async-loading-with-default-light/webpack.config.js +++ b/plugin-test/css-extract/cases/multiple-themes-async-loading/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./src/index.js", diff --git a/packages/rspack/tests/cssExtract/cases/nested/a.css b/plugin-test/css-extract/cases/nested/a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/nested/a.css rename to plugin-test/css-extract/cases/nested/a.css diff --git a/packages/rspack/tests/cssExtract/cases/nested/b.css b/plugin-test/css-extract/cases/nested/b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/nested/b.css rename to plugin-test/css-extract/cases/nested/b.css diff --git a/packages/rspack/tests/cssExtract/cases/nested/component.css b/plugin-test/css-extract/cases/nested/component.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/nested/component.css rename to plugin-test/css-extract/cases/nested/component.css diff --git a/packages/rspack/tests/cssExtract/cases/nested/component.js b/plugin-test/css-extract/cases/nested/component.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/nested/component.js rename to plugin-test/css-extract/cases/nested/component.js diff --git a/packages/rspack/tests/cssExtract/cases/nested/expected/main.css b/plugin-test/css-extract/cases/nested/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/nested/expected/main.css rename to plugin-test/css-extract/cases/nested/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/nested/index.js b/plugin-test/css-extract/cases/nested/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/nested/index.js rename to plugin-test/css-extract/cases/nested/index.js diff --git a/plugin-test/css-extract/cases/nested/webpack.config.js b/plugin-test/css-extract/cases/nested/webpack.config.js new file mode 100644 index 00000000000..bc1745072da --- /dev/null +++ b/plugin-test/css-extract/cases/nested/webpack.config.js @@ -0,0 +1,18 @@ +const { CssExtractRspackPlugin } = require("@rspack/core"); + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [CssExtractRspackPlugin.loader, "css-loader"] + } + ] + }, + plugins: [ + new CssExtractRspackPlugin({ + filename: "[name].css" + }) + ] +}; diff --git a/packages/rspack/tests/cssExtract/cases/new-url/expected/ebb93b9cb62e55bcbc35.png b/plugin-test/css-extract/cases/new-url/expected/ebb93b9cb62e55bcbc35.png similarity index 100% rename from packages/rspack/tests/cssExtract/cases/new-url/expected/ebb93b9cb62e55bcbc35.png rename to plugin-test/css-extract/cases/new-url/expected/ebb93b9cb62e55bcbc35.png diff --git a/packages/rspack/tests/cssExtract/cases/new-url/expected/main.css b/plugin-test/css-extract/cases/new-url/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/new-url/expected/main.css rename to plugin-test/css-extract/cases/new-url/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/new-url/expected/main.js b/plugin-test/css-extract/cases/new-url/expected/main.js similarity index 94% rename from packages/rspack/tests/cssExtract/cases/new-url/expected/main.js rename to plugin-test/css-extract/cases/new-url/expected/main.js index f1b779b0896..e4dcb070b51 100644 --- a/packages/rspack/tests/cssExtract/cases/new-url/expected/main.js +++ b/plugin-test/css-extract/cases/new-url/expected/main.js @@ -1,13 +1,13 @@ (function() { var __webpack_modules__ = { -"./style.css?76f1": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { +"./style.css?b16f": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // extracted by css-extract-rspack-plugin }), "./index.js": (function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { -const myURL = new URL(/* asset import */__webpack_require__(/*! ./style.css */"./style.css?76f1"), __webpack_require__.b); +const myURL = new URL(/* asset import */__webpack_require__(/*! ./style.css */"./style.css?b16f"), __webpack_require__.b); console.log(myURL); }), diff --git a/packages/rspack/tests/cssExtract/cases/new-url/img.png b/plugin-test/css-extract/cases/new-url/img.png similarity index 100% rename from packages/rspack/tests/cssExtract/cases/new-url/img.png rename to plugin-test/css-extract/cases/new-url/img.png diff --git a/packages/rspack/tests/cssExtract/cases/new-url/index.js b/plugin-test/css-extract/cases/new-url/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/new-url/index.js rename to plugin-test/css-extract/cases/new-url/index.js diff --git a/packages/rspack/tests/cssExtract/cases/new-url/style.css b/plugin-test/css-extract/cases/new-url/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/new-url/style.css rename to plugin-test/css-extract/cases/new-url/style.css diff --git a/packages/rspack/tests/cssExtract/cases/new-url/webpack.config.js b/plugin-test/css-extract/cases/new-url/webpack.config.js similarity index 81% rename from packages/rspack/tests/cssExtract/cases/new-url/webpack.config.js rename to plugin-test/css-extract/cases/new-url/webpack.config.js index 928066daf23..d1f6d448f1e 100644 --- a/packages/rspack/tests/cssExtract/cases/new-url/webpack.config.js +++ b/plugin-test/css-extract/cases/new-url/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/no-identifier/index.js b/plugin-test/css-extract/cases/no-identifier/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/no-identifier/index.js rename to plugin-test/css-extract/cases/no-identifier/index.js diff --git a/packages/rspack/tests/cssExtract/cases/no-identifier/style.css b/plugin-test/css-extract/cases/no-identifier/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/no-identifier/style.css rename to plugin-test/css-extract/cases/no-identifier/style.css diff --git a/packages/rspack/tests/cssExtract/cases/no-identifier/webpack.config.js b/plugin-test/css-extract/cases/no-identifier/webpack.config.js similarity index 87% rename from packages/rspack/tests/cssExtract/cases/no-identifier/webpack.config.js rename to plugin-test/css-extract/cases/no-identifier/webpack.config.js index 34358a6131a..66afea1ab5e 100644 --- a/packages/rspack/tests/cssExtract/cases/no-identifier/webpack.config.js +++ b/plugin-test/css-extract/cases/no-identifier/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/no-loader/index.js b/plugin-test/css-extract/cases/no-loader/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/no-loader/index.js rename to plugin-test/css-extract/cases/no-loader/index.js diff --git a/packages/rspack/tests/cssExtract/cases/no-loader/style.css b/plugin-test/css-extract/cases/no-loader/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/no-loader/style.css rename to plugin-test/css-extract/cases/no-loader/style.css diff --git a/packages/rspack/tests/cssExtract/cases/no-loader/webpack.config.js b/plugin-test/css-extract/cases/no-loader/webpack.config.js similarity index 77% rename from packages/rspack/tests/cssExtract/cases/no-loader/webpack.config.js rename to plugin-test/css-extract/cases/no-loader/webpack.config.js index a3cca1ee02c..f63f4cf17af 100644 --- a/packages/rspack/tests/cssExtract/cases/no-loader/webpack.config.js +++ b/plugin-test/css-extract/cases/no-loader/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/no-runtime/async.css b/plugin-test/css-extract/cases/no-runtime/async.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/no-runtime/async.css rename to plugin-test/css-extract/cases/no-runtime/async.css diff --git a/packages/rspack/tests/cssExtract/cases/no-runtime/expected/async.css b/plugin-test/css-extract/cases/no-runtime/expected/async.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/no-runtime/expected/async.css rename to plugin-test/css-extract/cases/no-runtime/expected/async.css diff --git a/packages/rspack/tests/cssExtract/cases/chunkFilename-fullhash/expected/async.js b/plugin-test/css-extract/cases/no-runtime/expected/async.js similarity index 77% rename from packages/rspack/tests/cssExtract/cases/chunkFilename-fullhash/expected/async.js rename to plugin-test/css-extract/cases/no-runtime/expected/async.js index 4f3d5d8ab7e..b638abf8a06 100644 --- a/packages/rspack/tests/cssExtract/cases/chunkFilename-fullhash/expected/async.js +++ b/plugin-test/css-extract/cases/no-runtime/expected/async.js @@ -1,5 +1,5 @@ (self['webpackChunk'] = self['webpackChunk'] || []).push([["async"], { -"./async.css?74c7": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { +"./async.css?833a": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // extracted by css-extract-rspack-plugin diff --git a/packages/rspack/tests/cssExtract/cases/no-runtime/expected/main.css b/plugin-test/css-extract/cases/no-runtime/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/no-runtime/expected/main.css rename to plugin-test/css-extract/cases/no-runtime/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/no-runtime/expected/main.js b/plugin-test/css-extract/cases/no-runtime/expected/main.js similarity index 97% rename from packages/rspack/tests/cssExtract/cases/no-runtime/expected/main.js rename to plugin-test/css-extract/cases/no-runtime/expected/main.js index 070dd33e04f..55da4fb0288 100644 --- a/packages/rspack/tests/cssExtract/cases/no-runtime/expected/main.js +++ b/plugin-test/css-extract/cases/no-runtime/expected/main.js @@ -1,6 +1,6 @@ (function() { var __webpack_modules__ = { -"./style.css?76f1": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { +"./style.css?b16f": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // extracted by css-extract-rspack-plugin @@ -9,9 +9,9 @@ __webpack_require__.r(__webpack_exports__); "./index.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.css */"./style.css?76f1"); +/* harmony import */var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.css */"./style.css?b16f"); -__webpack_require__.e("async").then(__webpack_require__.bind(__webpack_require__, /*! ./async.css */"./async.css?74c7")); +__webpack_require__.e("async").then(__webpack_require__.bind(__webpack_require__, /*! ./async.css */"./async.css?833a")); }), } diff --git a/packages/rspack/tests/cssExtract/cases/no-runtime/index.js b/plugin-test/css-extract/cases/no-runtime/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/no-runtime/index.js rename to plugin-test/css-extract/cases/no-runtime/index.js diff --git a/packages/rspack/tests/cssExtract/cases/no-runtime/style.css b/plugin-test/css-extract/cases/no-runtime/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/no-runtime/style.css rename to plugin-test/css-extract/cases/no-runtime/style.css diff --git a/packages/rspack/tests/cssExtract/cases/no-runtime/webpack.config.js b/plugin-test/css-extract/cases/no-runtime/webpack.config.js similarity index 81% rename from packages/rspack/tests/cssExtract/cases/no-runtime/webpack.config.js rename to plugin-test/css-extract/cases/no-runtime/webpack.config.js index 8ac23300139..fac891af2b0 100644 --- a/packages/rspack/tests/cssExtract/cases/no-runtime/webpack.config.js +++ b/plugin-test/css-extract/cases/no-runtime/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/no-source-map/expected/main.css b/plugin-test/css-extract/cases/no-source-map/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/no-source-map/expected/main.css rename to plugin-test/css-extract/cases/no-source-map/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/no-source-map/index.js b/plugin-test/css-extract/cases/no-source-map/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/no-source-map/index.js rename to plugin-test/css-extract/cases/no-source-map/index.js diff --git a/packages/rspack/tests/cssExtract/cases/no-source-map/style.css b/plugin-test/css-extract/cases/no-source-map/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/no-source-map/style.css rename to plugin-test/css-extract/cases/no-source-map/style.css diff --git a/packages/rspack/tests/cssExtract/cases/no-source-map/webpack.config.js b/plugin-test/css-extract/cases/no-source-map/webpack.config.js similarity index 87% rename from packages/rspack/tests/cssExtract/cases/no-source-map/webpack.config.js rename to plugin-test/css-extract/cases/no-source-map/webpack.config.js index cf6ac78dde6..3daaf8f98e8 100644 --- a/packages/rspack/tests/cssExtract/cases/no-source-map/webpack.config.js +++ b/plugin-test/css-extract/cases/no-source-map/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/output-iife/expected/main.css b/plugin-test/css-extract/cases/output-iife/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/output-iife/expected/main.css rename to plugin-test/css-extract/cases/output-iife/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/output-iife/index.js b/plugin-test/css-extract/cases/output-iife/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/output-iife/index.js rename to plugin-test/css-extract/cases/output-iife/index.js diff --git a/packages/rspack/tests/cssExtract/cases/output-iife/style.css b/plugin-test/css-extract/cases/output-iife/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/output-iife/style.css rename to plugin-test/css-extract/cases/output-iife/style.css diff --git a/packages/rspack/tests/cssExtract/cases/output-iife/webpack.config.js b/plugin-test/css-extract/cases/output-iife/webpack.config.js similarity index 81% rename from packages/rspack/tests/cssExtract/cases/output-iife/webpack.config.js rename to plugin-test/css-extract/cases/output-iife/webpack.config.js index 021de4c7c6e..e4b2144d2fa 100644 --- a/packages/rspack/tests/cssExtract/cases/output-iife/webpack.config.js +++ b/plugin-test/css-extract/cases/output-iife/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/output-module/expected/main.css b/plugin-test/css-extract/cases/output-module/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/output-module/expected/main.css rename to plugin-test/css-extract/cases/output-module/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/output-module/index.js b/plugin-test/css-extract/cases/output-module/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/output-module/index.js rename to plugin-test/css-extract/cases/output-module/index.js diff --git a/packages/rspack/tests/cssExtract/cases/output-module/style.css b/plugin-test/css-extract/cases/output-module/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/output-module/style.css rename to plugin-test/css-extract/cases/output-module/style.css diff --git a/packages/rspack/tests/cssExtract/cases/output-module/webpack.config.js b/plugin-test/css-extract/cases/output-module/webpack.config.js similarity index 83% rename from packages/rspack/tests/cssExtract/cases/output-module/webpack.config.js rename to plugin-test/css-extract/cases/output-module/webpack.config.js index 17ac8022b78..fdbd0455e91 100644 --- a/packages/rspack/tests/cssExtract/cases/output-module/webpack.config.js +++ b/plugin-test/css-extract/cases/output-module/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/pathinfo-devtool-source-map/expected/main.css b/plugin-test/css-extract/cases/pathinfo-devtool-source-map/expected/main.css similarity index 58% rename from packages/rspack/tests/cssExtract/cases/pathinfo-devtool-source-map/expected/main.css rename to plugin-test/css-extract/cases/pathinfo-devtool-source-map/expected/main.css index 3bb13a02bbf..4d47ed6e79f 100644 --- a/packages/rspack/tests/cssExtract/cases/pathinfo-devtool-source-map/expected/main.css +++ b/plugin-test/css-extract/cases/pathinfo-devtool-source-map/expected/main.css @@ -1,20 +1,20 @@ -/*!*****************************************************************************!*\ - !*** css ../../../../../../node_modules/css-loader/dist/cjs.js!./style.css ***! - \*****************************************************************************/ +/*!***********************************************************************!*\ + !*** css ../../../../node_modules/css-loader/dist/cjs.js!./style.css ***! + \***********************************************************************/ body { background: red; } -/*!*****************************************************************************!*\ - !*** css ../../../../../../node_modules/css-loader/dist/cjs.js!./other.css ***! - \*****************************************************************************/ +/*!***********************************************************************!*\ + !*** css ../../../../node_modules/css-loader/dist/cjs.js!./other.css ***! + \***********************************************************************/ body { background: blue; } -/*!*****************************************************************************!*\ - !*** css ../../../../../../node_modules/css-loader/dist/cjs.js!./extra.css ***! - \*****************************************************************************/ +/*!***********************************************************************!*\ + !*** css ../../../../node_modules/css-loader/dist/cjs.js!./extra.css ***! + \***********************************************************************/ body { background: yellow; } diff --git a/packages/rspack/tests/cssExtract/cases/pathinfo-devtool-source-map/expected/main.css.map b/plugin-test/css-extract/cases/pathinfo-devtool-source-map/expected/main.css.map similarity index 100% rename from packages/rspack/tests/cssExtract/cases/pathinfo-devtool-source-map/expected/main.css.map rename to plugin-test/css-extract/cases/pathinfo-devtool-source-map/expected/main.css.map diff --git a/packages/rspack/tests/cssExtract/cases/pathinfo-devtool-source-map/extra.css b/plugin-test/css-extract/cases/pathinfo-devtool-source-map/extra.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/pathinfo-devtool-source-map/extra.css rename to plugin-test/css-extract/cases/pathinfo-devtool-source-map/extra.css diff --git a/packages/rspack/tests/cssExtract/cases/pathinfo-devtool-source-map/index.js b/plugin-test/css-extract/cases/pathinfo-devtool-source-map/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/pathinfo-devtool-source-map/index.js rename to plugin-test/css-extract/cases/pathinfo-devtool-source-map/index.js diff --git a/packages/rspack/tests/cssExtract/cases/pathinfo-devtool-source-map/other.css b/plugin-test/css-extract/cases/pathinfo-devtool-source-map/other.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/pathinfo-devtool-source-map/other.css rename to plugin-test/css-extract/cases/pathinfo-devtool-source-map/other.css diff --git a/packages/rspack/tests/cssExtract/cases/pathinfo-devtool-source-map/style.css b/plugin-test/css-extract/cases/pathinfo-devtool-source-map/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/pathinfo-devtool-source-map/style.css rename to plugin-test/css-extract/cases/pathinfo-devtool-source-map/style.css diff --git a/packages/rspack/tests/cssExtract/cases/pathinfo-devtool-source-map/webpack.config.js b/plugin-test/css-extract/cases/pathinfo-devtool-source-map/webpack.config.js similarity index 84% rename from packages/rspack/tests/cssExtract/cases/pathinfo-devtool-source-map/webpack.config.js rename to plugin-test/css-extract/cases/pathinfo-devtool-source-map/webpack.config.js index 9b5a277fd04..9d553a0584b 100644 --- a/packages/rspack/tests/cssExtract/cases/pathinfo-devtool-source-map/webpack.config.js +++ b/plugin-test/css-extract/cases/pathinfo-devtool-source-map/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/pathinfo/expected/main.css b/plugin-test/css-extract/cases/pathinfo/expected/main.css similarity index 56% rename from packages/rspack/tests/cssExtract/cases/pathinfo/expected/main.css rename to plugin-test/css-extract/cases/pathinfo/expected/main.css index f4d188056c1..013476b2062 100644 --- a/packages/rspack/tests/cssExtract/cases/pathinfo/expected/main.css +++ b/plugin-test/css-extract/cases/pathinfo/expected/main.css @@ -1,20 +1,20 @@ -/*!*****************************************************************************!*\ - !*** css ../../../../../../node_modules/css-loader/dist/cjs.js!./style.css ***! - \*****************************************************************************/ +/*!***********************************************************************!*\ + !*** css ../../../../node_modules/css-loader/dist/cjs.js!./style.css ***! + \***********************************************************************/ body { background: red; } -/*!*****************************************************************************!*\ - !*** css ../../../../../../node_modules/css-loader/dist/cjs.js!./other.css ***! - \*****************************************************************************/ +/*!***********************************************************************!*\ + !*** css ../../../../node_modules/css-loader/dist/cjs.js!./other.css ***! + \***********************************************************************/ body { background: blue; } -/*!*****************************************************************************!*\ - !*** css ../../../../../../node_modules/css-loader/dist/cjs.js!./extra.css ***! - \*****************************************************************************/ +/*!***********************************************************************!*\ + !*** css ../../../../node_modules/css-loader/dist/cjs.js!./extra.css ***! + \***********************************************************************/ body { background: yellow; } diff --git a/packages/rspack/tests/cssExtract/cases/pathinfo/extra.css b/plugin-test/css-extract/cases/pathinfo/extra.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/pathinfo/extra.css rename to plugin-test/css-extract/cases/pathinfo/extra.css diff --git a/packages/rspack/tests/cssExtract/cases/pathinfo/index.js b/plugin-test/css-extract/cases/pathinfo/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/pathinfo/index.js rename to plugin-test/css-extract/cases/pathinfo/index.js diff --git a/packages/rspack/tests/cssExtract/cases/pathinfo/other.css b/plugin-test/css-extract/cases/pathinfo/other.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/pathinfo/other.css rename to plugin-test/css-extract/cases/pathinfo/other.css diff --git a/packages/rspack/tests/cssExtract/cases/pathinfo/style.css b/plugin-test/css-extract/cases/pathinfo/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/pathinfo/style.css rename to plugin-test/css-extract/cases/pathinfo/style.css diff --git a/packages/rspack/tests/cssExtract/cases/pathinfo/webpack.config.js b/plugin-test/css-extract/cases/pathinfo/webpack.config.js similarity index 82% rename from packages/rspack/tests/cssExtract/cases/pathinfo/webpack.config.js rename to plugin-test/css-extract/cases/pathinfo/webpack.config.js index bb65ae11244..3bd3b2ad33e 100644 --- a/packages/rspack/tests/cssExtract/cases/pathinfo/webpack.config.js +++ b/plugin-test/css-extract/cases/pathinfo/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-1/expected/61dc21364604d5319600.svg b/plugin-test/css-extract/cases/publicpath-absolute-url-1/expected/61dc21364604d5319600.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-1/expected/61dc21364604d5319600.svg rename to plugin-test/css-extract/cases/publicpath-absolute-url-1/expected/61dc21364604d5319600.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-1/expected/main.css b/plugin-test/css-extract/cases/publicpath-absolute-url-1/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-1/expected/main.css rename to plugin-test/css-extract/cases/publicpath-absolute-url-1/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-1/index.js b/plugin-test/css-extract/cases/publicpath-absolute-url-1/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-1/index.js rename to plugin-test/css-extract/cases/publicpath-absolute-url-1/index.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-1/react.svg b/plugin-test/css-extract/cases/publicpath-absolute-url-1/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-1/react.svg rename to plugin-test/css-extract/cases/publicpath-absolute-url-1/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-1/style.css b/plugin-test/css-extract/cases/publicpath-absolute-url-1/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-1/style.css rename to plugin-test/css-extract/cases/publicpath-absolute-url-1/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-1/webpack.config.js b/plugin-test/css-extract/cases/publicpath-absolute-url-1/webpack.config.js similarity index 85% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-1/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-absolute-url-1/webpack.config.js index acabbe865c8..3ed42d35143 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-1/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-absolute-url-1/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-2/expected/61dc21364604d5319600.svg b/plugin-test/css-extract/cases/publicpath-absolute-url-2/expected/61dc21364604d5319600.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-2/expected/61dc21364604d5319600.svg rename to plugin-test/css-extract/cases/publicpath-absolute-url-2/expected/61dc21364604d5319600.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-2/expected/main.css b/plugin-test/css-extract/cases/publicpath-absolute-url-2/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-2/expected/main.css rename to plugin-test/css-extract/cases/publicpath-absolute-url-2/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-2/index.js b/plugin-test/css-extract/cases/publicpath-absolute-url-2/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-2/index.js rename to plugin-test/css-extract/cases/publicpath-absolute-url-2/index.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-2/react.svg b/plugin-test/css-extract/cases/publicpath-absolute-url-2/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-2/react.svg rename to plugin-test/css-extract/cases/publicpath-absolute-url-2/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-2/rspack.config.js b/plugin-test/css-extract/cases/publicpath-absolute-url-2/rspack.config.js similarity index 87% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-2/rspack.config.js rename to plugin-test/css-extract/cases/publicpath-absolute-url-2/rspack.config.js index d9b794909b5..e846829e8dc 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-2/rspack.config.js +++ b/plugin-test/css-extract/cases/publicpath-absolute-url-2/rspack.config.js @@ -1,4 +1,4 @@ -const CssExtractRspackPlugin = require("../../../").default; +const CssExtractRspackPlugin = require("@rspack/core").default; module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-2/style.css b/plugin-test/css-extract/cases/publicpath-absolute-url-2/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-2/style.css rename to plugin-test/css-extract/cases/publicpath-absolute-url-2/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-2/test.filter.js b/plugin-test/css-extract/cases/publicpath-absolute-url-2/test.filter.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-2/test.filter.js rename to plugin-test/css-extract/cases/publicpath-absolute-url-2/test.filter.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-2/webpack.config.js b/plugin-test/css-extract/cases/publicpath-absolute-url-2/webpack.config.js similarity index 85% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-2/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-absolute-url-2/webpack.config.js index c53d84a9f81..3cdd8d84822 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-2/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-absolute-url-2/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-3/expected/61dc21364604d5319600.svg b/plugin-test/css-extract/cases/publicpath-absolute-url-3/expected/61dc21364604d5319600.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-3/expected/61dc21364604d5319600.svg rename to plugin-test/css-extract/cases/publicpath-absolute-url-3/expected/61dc21364604d5319600.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-3/expected/main.css b/plugin-test/css-extract/cases/publicpath-absolute-url-3/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-3/expected/main.css rename to plugin-test/css-extract/cases/publicpath-absolute-url-3/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-3/index.js b/plugin-test/css-extract/cases/publicpath-absolute-url-3/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-3/index.js rename to plugin-test/css-extract/cases/publicpath-absolute-url-3/index.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-3/react.svg b/plugin-test/css-extract/cases/publicpath-absolute-url-3/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-3/react.svg rename to plugin-test/css-extract/cases/publicpath-absolute-url-3/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-3/style.css b/plugin-test/css-extract/cases/publicpath-absolute-url-3/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-3/style.css rename to plugin-test/css-extract/cases/publicpath-absolute-url-3/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-3/webpack.config.js b/plugin-test/css-extract/cases/publicpath-absolute-url-3/webpack.config.js similarity index 85% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-3/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-absolute-url-3/webpack.config.js index dcb08cc2487..6dc6fb91b2c 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-3/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-absolute-url-3/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-4/expected/61dc21364604d5319600.svg b/plugin-test/css-extract/cases/publicpath-absolute-url-4/expected/61dc21364604d5319600.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-4/expected/61dc21364604d5319600.svg rename to plugin-test/css-extract/cases/publicpath-absolute-url-4/expected/61dc21364604d5319600.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-4/expected/main.css b/plugin-test/css-extract/cases/publicpath-absolute-url-4/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-4/expected/main.css rename to plugin-test/css-extract/cases/publicpath-absolute-url-4/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-4/index.js b/plugin-test/css-extract/cases/publicpath-absolute-url-4/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-4/index.js rename to plugin-test/css-extract/cases/publicpath-absolute-url-4/index.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-4/react.svg b/plugin-test/css-extract/cases/publicpath-absolute-url-4/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-4/react.svg rename to plugin-test/css-extract/cases/publicpath-absolute-url-4/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-4/style.css b/plugin-test/css-extract/cases/publicpath-absolute-url-4/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-4/style.css rename to plugin-test/css-extract/cases/publicpath-absolute-url-4/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-4/webpack.config.js b/plugin-test/css-extract/cases/publicpath-absolute-url-4/webpack.config.js similarity index 85% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-4/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-absolute-url-4/webpack.config.js index 3bceea0e25f..18fbbda3e73 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-4/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-absolute-url-4/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-5/expected/61dc21364604d5319600.svg b/plugin-test/css-extract/cases/publicpath-absolute-url-5/expected/61dc21364604d5319600.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-5/expected/61dc21364604d5319600.svg rename to plugin-test/css-extract/cases/publicpath-absolute-url-5/expected/61dc21364604d5319600.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-5/expected/main.css b/plugin-test/css-extract/cases/publicpath-absolute-url-5/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-5/expected/main.css rename to plugin-test/css-extract/cases/publicpath-absolute-url-5/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-5/index.js b/plugin-test/css-extract/cases/publicpath-absolute-url-5/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-5/index.js rename to plugin-test/css-extract/cases/publicpath-absolute-url-5/index.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-5/react.svg b/plugin-test/css-extract/cases/publicpath-absolute-url-5/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-5/react.svg rename to plugin-test/css-extract/cases/publicpath-absolute-url-5/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-5/style.css b/plugin-test/css-extract/cases/publicpath-absolute-url-5/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-5/style.css rename to plugin-test/css-extract/cases/publicpath-absolute-url-5/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-5/webpack.config.js b/plugin-test/css-extract/cases/publicpath-absolute-url-5/webpack.config.js similarity index 84% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-5/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-absolute-url-5/webpack.config.js index 79980a6727d..657c250acbe 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-5/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-absolute-url-5/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-6/expected/61dc21364604d5319600.svg b/plugin-test/css-extract/cases/publicpath-absolute-url-6/expected/61dc21364604d5319600.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-6/expected/61dc21364604d5319600.svg rename to plugin-test/css-extract/cases/publicpath-absolute-url-6/expected/61dc21364604d5319600.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-6/expected/main.css b/plugin-test/css-extract/cases/publicpath-absolute-url-6/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-6/expected/main.css rename to plugin-test/css-extract/cases/publicpath-absolute-url-6/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-6/index.js b/plugin-test/css-extract/cases/publicpath-absolute-url-6/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-6/index.js rename to plugin-test/css-extract/cases/publicpath-absolute-url-6/index.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-6/react.svg b/plugin-test/css-extract/cases/publicpath-absolute-url-6/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-6/react.svg rename to plugin-test/css-extract/cases/publicpath-absolute-url-6/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-6/style.css b/plugin-test/css-extract/cases/publicpath-absolute-url-6/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-6/style.css rename to plugin-test/css-extract/cases/publicpath-absolute-url-6/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-6/webpack.config.js b/plugin-test/css-extract/cases/publicpath-absolute-url-6/webpack.config.js similarity index 85% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-6/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-absolute-url-6/webpack.config.js index c513094897f..47310f855f5 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url-6/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-absolute-url-6/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url/expected/61dc21364604d5319600.svg b/plugin-test/css-extract/cases/publicpath-absolute-url/expected/61dc21364604d5319600.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url/expected/61dc21364604d5319600.svg rename to plugin-test/css-extract/cases/publicpath-absolute-url/expected/61dc21364604d5319600.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url/expected/main.css b/plugin-test/css-extract/cases/publicpath-absolute-url/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url/expected/main.css rename to plugin-test/css-extract/cases/publicpath-absolute-url/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url/index.js b/plugin-test/css-extract/cases/publicpath-absolute-url/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url/index.js rename to plugin-test/css-extract/cases/publicpath-absolute-url/index.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url/react.svg b/plugin-test/css-extract/cases/publicpath-absolute-url/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url/react.svg rename to plugin-test/css-extract/cases/publicpath-absolute-url/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url/style.css b/plugin-test/css-extract/cases/publicpath-absolute-url/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url/style.css rename to plugin-test/css-extract/cases/publicpath-absolute-url/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url/webpack.config.js b/plugin-test/css-extract/cases/publicpath-absolute-url/webpack.config.js similarity index 85% rename from packages/rspack/tests/cssExtract/cases/publicpath-absolute-url/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-absolute-url/webpack.config.js index 19c9b591fcc..c8cd41fe05c 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-absolute-url/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-absolute-url/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-2/expected/assets/img/react.svg b/plugin-test/css-extract/cases/publicpath-auto-2/expected/assets/img/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-2/expected/assets/img/react.svg rename to plugin-test/css-extract/cases/publicpath-auto-2/expected/assets/img/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-2/expected/same_root.svg b/plugin-test/css-extract/cases/publicpath-auto-2/expected/same_root.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-2/expected/same_root.svg rename to plugin-test/css-extract/cases/publicpath-auto-2/expected/same_root.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-2/expected/styles/main.css b/plugin-test/css-extract/cases/publicpath-auto-2/expected/styles/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-2/expected/styles/main.css rename to plugin-test/css-extract/cases/publicpath-auto-2/expected/styles/main.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-2/expected/styles/nested/nested_dir.svg b/plugin-test/css-extract/cases/publicpath-auto-2/expected/styles/nested/nested_dir.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-2/expected/styles/nested/nested_dir.svg rename to plugin-test/css-extract/cases/publicpath-auto-2/expected/styles/nested/nested_dir.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-2/expected/styles/same_dir.svg b/plugin-test/css-extract/cases/publicpath-auto-2/expected/styles/same_dir.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-2/expected/styles/same_dir.svg rename to plugin-test/css-extract/cases/publicpath-auto-2/expected/styles/same_dir.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-2/images/react.svg b/plugin-test/css-extract/cases/publicpath-auto-2/images/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-2/images/react.svg rename to plugin-test/css-extract/cases/publicpath-auto-2/images/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-2/index.js b/plugin-test/css-extract/cases/publicpath-auto-2/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-2/index.js rename to plugin-test/css-extract/cases/publicpath-auto-2/index.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-2/nested_dir.svg b/plugin-test/css-extract/cases/publicpath-auto-2/nested_dir.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-2/nested_dir.svg rename to plugin-test/css-extract/cases/publicpath-auto-2/nested_dir.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-2/outer.svg b/plugin-test/css-extract/cases/publicpath-auto-2/outer.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-2/outer.svg rename to plugin-test/css-extract/cases/publicpath-auto-2/outer.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-2/same_dir.svg b/plugin-test/css-extract/cases/publicpath-auto-2/same_dir.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-2/same_dir.svg rename to plugin-test/css-extract/cases/publicpath-auto-2/same_dir.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-2/same_root.svg b/plugin-test/css-extract/cases/publicpath-auto-2/same_root.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-2/same_root.svg rename to plugin-test/css-extract/cases/publicpath-auto-2/same_root.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-2/style.css b/plugin-test/css-extract/cases/publicpath-auto-2/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-2/style.css rename to plugin-test/css-extract/cases/publicpath-auto-2/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-2/webpack.config.js b/plugin-test/css-extract/cases/publicpath-auto-2/webpack.config.js similarity index 93% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-2/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-auto-2/webpack.config.js index b40bc672b44..06ea97343ad 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-auto-2/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-auto-2/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-3/expected/assets/img/react.svg b/plugin-test/css-extract/cases/publicpath-auto-3/expected/assets/img/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-3/expected/assets/img/react.svg rename to plugin-test/css-extract/cases/publicpath-auto-3/expected/assets/img/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-3/expected/assets/img2.svg b/plugin-test/css-extract/cases/publicpath-auto-3/expected/assets/img2.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-3/expected/assets/img2.svg rename to plugin-test/css-extract/cases/publicpath-auto-3/expected/assets/img2.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-3/expected/assets/nested/img3.svg b/plugin-test/css-extract/cases/publicpath-auto-3/expected/assets/nested/img3.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-3/expected/assets/nested/img3.svg rename to plugin-test/css-extract/cases/publicpath-auto-3/expected/assets/nested/img3.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-3/expected/img1.svg b/plugin-test/css-extract/cases/publicpath-auto-3/expected/img1.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-3/expected/img1.svg rename to plugin-test/css-extract/cases/publicpath-auto-3/expected/img1.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-3/expected/img4.svg b/plugin-test/css-extract/cases/publicpath-auto-3/expected/img4.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-3/expected/img4.svg rename to plugin-test/css-extract/cases/publicpath-auto-3/expected/img4.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-3/expected/main.css b/plugin-test/css-extract/cases/publicpath-auto-3/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-3/expected/main.css rename to plugin-test/css-extract/cases/publicpath-auto-3/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-3/images/react.svg b/plugin-test/css-extract/cases/publicpath-auto-3/images/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-3/images/react.svg rename to plugin-test/css-extract/cases/publicpath-auto-3/images/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-3/img2.svg b/plugin-test/css-extract/cases/publicpath-auto-3/img2.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-3/img2.svg rename to plugin-test/css-extract/cases/publicpath-auto-3/img2.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-3/img3.svg b/plugin-test/css-extract/cases/publicpath-auto-3/img3.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-3/img3.svg rename to plugin-test/css-extract/cases/publicpath-auto-3/img3.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-3/index.js b/plugin-test/css-extract/cases/publicpath-auto-3/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-3/index.js rename to plugin-test/css-extract/cases/publicpath-auto-3/index.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-3/outer.svg b/plugin-test/css-extract/cases/publicpath-auto-3/outer.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-3/outer.svg rename to plugin-test/css-extract/cases/publicpath-auto-3/outer.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-3/src/styles/img/img4.svg b/plugin-test/css-extract/cases/publicpath-auto-3/src/styles/img/img4.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-3/src/styles/img/img4.svg rename to plugin-test/css-extract/cases/publicpath-auto-3/src/styles/img/img4.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-3/src/styles/img1.svg b/plugin-test/css-extract/cases/publicpath-auto-3/src/styles/img1.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-3/src/styles/img1.svg rename to plugin-test/css-extract/cases/publicpath-auto-3/src/styles/img1.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-3/src/styles/style.css b/plugin-test/css-extract/cases/publicpath-auto-3/src/styles/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-3/src/styles/style.css rename to plugin-test/css-extract/cases/publicpath-auto-3/src/styles/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-3/webpack.config.js b/plugin-test/css-extract/cases/publicpath-auto-3/webpack.config.js similarity index 94% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-3/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-auto-3/webpack.config.js index d1cfe16db33..496ced1742e 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-auto-3/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-auto-3/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-4/app/img.png b/plugin-test/css-extract/cases/publicpath-auto-4/app/img.png similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-4/app/img.png rename to plugin-test/css-extract/cases/publicpath-auto-4/app/img.png diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-4/app/index.js b/plugin-test/css-extract/cases/publicpath-auto-4/app/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-4/app/index.js rename to plugin-test/css-extract/cases/publicpath-auto-4/app/index.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-4/app/nested/nested-img.png b/plugin-test/css-extract/cases/publicpath-auto-4/app/nested/nested-img.png similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-4/app/nested/nested-img.png rename to plugin-test/css-extract/cases/publicpath-auto-4/app/nested/nested-img.png diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-4/app/style.css b/plugin-test/css-extract/cases/publicpath-auto-4/app/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-4/app/style.css rename to plugin-test/css-extract/cases/publicpath-auto-4/app/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-4/expected/img.png b/plugin-test/css-extract/cases/publicpath-auto-4/expected/img.png similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-4/expected/img.png rename to plugin-test/css-extract/cases/publicpath-auto-4/expected/img.png diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-4/expected/main.css b/plugin-test/css-extract/cases/publicpath-auto-4/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-4/expected/main.css rename to plugin-test/css-extract/cases/publicpath-auto-4/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-4/expected/nested/nested-img.png b/plugin-test/css-extract/cases/publicpath-auto-4/expected/nested/nested-img.png similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-4/expected/nested/nested-img.png rename to plugin-test/css-extract/cases/publicpath-auto-4/expected/nested/nested-img.png diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-4/outer-img.png b/plugin-test/css-extract/cases/publicpath-auto-4/outer-img.png similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-4/outer-img.png rename to plugin-test/css-extract/cases/publicpath-auto-4/outer-img.png diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto-4/webpack.config.js b/plugin-test/css-extract/cases/publicpath-auto-4/webpack.config.js similarity index 89% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto-4/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-auto-4/webpack.config.js index 1be89b31483..042a741b0bf 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-auto-4/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-auto-4/webpack.config.js @@ -1,6 +1,6 @@ const path = require("path"); -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto/expected/assets/react.svg b/plugin-test/css-extract/cases/publicpath-auto/expected/assets/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto/expected/assets/react.svg rename to plugin-test/css-extract/cases/publicpath-auto/expected/assets/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto/expected/styles/main.css b/plugin-test/css-extract/cases/publicpath-auto/expected/styles/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto/expected/styles/main.css rename to plugin-test/css-extract/cases/publicpath-auto/expected/styles/main.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto/index.js b/plugin-test/css-extract/cases/publicpath-auto/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto/index.js rename to plugin-test/css-extract/cases/publicpath-auto/index.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto/react.svg b/plugin-test/css-extract/cases/publicpath-auto/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto/react.svg rename to plugin-test/css-extract/cases/publicpath-auto/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto/style.css b/plugin-test/css-extract/cases/publicpath-auto/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto/style.css rename to plugin-test/css-extract/cases/publicpath-auto/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-auto/webpack.config.js b/plugin-test/css-extract/cases/publicpath-auto/webpack.config.js similarity index 88% rename from packages/rspack/tests/cssExtract/cases/publicpath-auto/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-auto/webpack.config.js index 2feea7e9573..f3f7afa2a0c 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-auto/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-auto/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-default-auto/expected/61dc21364604d5319600.svg b/plugin-test/css-extract/cases/publicpath-default-auto/expected/61dc21364604d5319600.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-default-auto/expected/61dc21364604d5319600.svg rename to plugin-test/css-extract/cases/publicpath-default-auto/expected/61dc21364604d5319600.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-default-auto/expected/main.css b/plugin-test/css-extract/cases/publicpath-default-auto/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-default-auto/expected/main.css rename to plugin-test/css-extract/cases/publicpath-default-auto/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-default-auto/index.js b/plugin-test/css-extract/cases/publicpath-default-auto/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-default-auto/index.js rename to plugin-test/css-extract/cases/publicpath-default-auto/index.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-default-auto/react.svg b/plugin-test/css-extract/cases/publicpath-default-auto/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-default-auto/react.svg rename to plugin-test/css-extract/cases/publicpath-default-auto/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-default-auto/style.css b/plugin-test/css-extract/cases/publicpath-default-auto/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-default-auto/style.css rename to plugin-test/css-extract/cases/publicpath-default-auto/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-default-auto/webpack.config.js b/plugin-test/css-extract/cases/publicpath-default-auto/webpack.config.js similarity index 81% rename from packages/rspack/tests/cssExtract/cases/publicpath-default-auto/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-default-auto/webpack.config.js index 82b6c7d6b58..6dcd2343bfe 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-default-auto/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-default-auto/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-empty-string/expected/61dc21364604d5319600.svg b/plugin-test/css-extract/cases/publicpath-empty-string/expected/61dc21364604d5319600.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-empty-string/expected/61dc21364604d5319600.svg rename to plugin-test/css-extract/cases/publicpath-empty-string/expected/61dc21364604d5319600.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-empty-string/expected/main.css b/plugin-test/css-extract/cases/publicpath-empty-string/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-empty-string/expected/main.css rename to plugin-test/css-extract/cases/publicpath-empty-string/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-empty-string/index.js b/plugin-test/css-extract/cases/publicpath-empty-string/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-empty-string/index.js rename to plugin-test/css-extract/cases/publicpath-empty-string/index.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-empty-string/react.svg b/plugin-test/css-extract/cases/publicpath-empty-string/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-empty-string/react.svg rename to plugin-test/css-extract/cases/publicpath-empty-string/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-empty-string/style.css b/plugin-test/css-extract/cases/publicpath-empty-string/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-empty-string/style.css rename to plugin-test/css-extract/cases/publicpath-empty-string/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-empty-string/webpack.config.js b/plugin-test/css-extract/cases/publicpath-empty-string/webpack.config.js similarity index 84% rename from packages/rspack/tests/cssExtract/cases/publicpath-empty-string/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-empty-string/webpack.config.js index d1780aceb07..036fb8f8ba8 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-empty-string/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-empty-string/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-function-2/expected/webpack-5-importModule/c9e192c015437a21dea1.svg b/plugin-test/css-extract/cases/publicpath-function-2/expected/webpack-5-importModule/c9e192c015437a21dea1.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-function-2/expected/webpack-5-importModule/c9e192c015437a21dea1.svg rename to plugin-test/css-extract/cases/publicpath-function-2/expected/webpack-5-importModule/c9e192c015437a21dea1.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-function-2/expected/webpack-5-importModule/nested/again/style.css b/plugin-test/css-extract/cases/publicpath-function-2/expected/webpack-5-importModule/nested/again/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-function-2/expected/webpack-5-importModule/nested/again/style.css rename to plugin-test/css-extract/cases/publicpath-function-2/expected/webpack-5-importModule/nested/again/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-function-2/expected/webpack-5-importModule/nested/style.css b/plugin-test/css-extract/cases/publicpath-function-2/expected/webpack-5-importModule/nested/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-function-2/expected/webpack-5-importModule/nested/style.css rename to plugin-test/css-extract/cases/publicpath-function-2/expected/webpack-5-importModule/nested/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-function-2/expected/webpack-5/61dc21364604d5319600.svg b/plugin-test/css-extract/cases/publicpath-function-2/expected/webpack-5/61dc21364604d5319600.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-function-2/expected/webpack-5/61dc21364604d5319600.svg rename to plugin-test/css-extract/cases/publicpath-function-2/expected/webpack-5/61dc21364604d5319600.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-function-2/expected/webpack-5/nested/again/style.css b/plugin-test/css-extract/cases/publicpath-function-2/expected/webpack-5/nested/again/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-function-2/expected/webpack-5/nested/again/style.css rename to plugin-test/css-extract/cases/publicpath-function-2/expected/webpack-5/nested/again/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-function-2/expected/webpack-5/nested/style.css b/plugin-test/css-extract/cases/publicpath-function-2/expected/webpack-5/nested/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-function-2/expected/webpack-5/nested/style.css rename to plugin-test/css-extract/cases/publicpath-function-2/expected/webpack-5/nested/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-function-2/nested/again/style.css b/plugin-test/css-extract/cases/publicpath-function-2/nested/again/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-function-2/nested/again/style.css rename to plugin-test/css-extract/cases/publicpath-function-2/nested/again/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-function-2/nested/style.css b/plugin-test/css-extract/cases/publicpath-function-2/nested/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-function-2/nested/style.css rename to plugin-test/css-extract/cases/publicpath-function-2/nested/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-function-2/react.svg b/plugin-test/css-extract/cases/publicpath-function-2/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-function-2/react.svg rename to plugin-test/css-extract/cases/publicpath-function-2/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-function-2/test.filter.js b/plugin-test/css-extract/cases/publicpath-function-2/test.filter.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-function-2/test.filter.js rename to plugin-test/css-extract/cases/publicpath-function-2/test.filter.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-function-2/webpack.config.js b/plugin-test/css-extract/cases/publicpath-function-2/webpack.config.js similarity index 91% rename from packages/rspack/tests/cssExtract/cases/publicpath-function-2/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-function-2/webpack.config.js index 63dde759628..f11d91c77b4 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-function-2/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-function-2/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: { diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-function/expected/61dc21364604d5319600.svg b/plugin-test/css-extract/cases/publicpath-function/expected/61dc21364604d5319600.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-function/expected/61dc21364604d5319600.svg rename to plugin-test/css-extract/cases/publicpath-function/expected/61dc21364604d5319600.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-function/expected/nested/again/style.css b/plugin-test/css-extract/cases/publicpath-function/expected/nested/again/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-function/expected/nested/again/style.css rename to plugin-test/css-extract/cases/publicpath-function/expected/nested/again/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-function/expected/nested/style.css b/plugin-test/css-extract/cases/publicpath-function/expected/nested/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-function/expected/nested/style.css rename to plugin-test/css-extract/cases/publicpath-function/expected/nested/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-function/nested/again/style.css b/plugin-test/css-extract/cases/publicpath-function/nested/again/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-function/nested/again/style.css rename to plugin-test/css-extract/cases/publicpath-function/nested/again/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-function/nested/style.css b/plugin-test/css-extract/cases/publicpath-function/nested/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-function/nested/style.css rename to plugin-test/css-extract/cases/publicpath-function/nested/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-function/react.svg b/plugin-test/css-extract/cases/publicpath-function/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-function/react.svg rename to plugin-test/css-extract/cases/publicpath-function/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-function/webpack.config.js b/plugin-test/css-extract/cases/publicpath-function/webpack.config.js similarity index 92% rename from packages/rspack/tests/cssExtract/cases/publicpath-function/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-function/webpack.config.js index 839d3f85b45..939ca0e9ece 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-function/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-function/webpack.config.js @@ -1,6 +1,6 @@ const path = require("path"); -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: { diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-loader-auto/expected/61dc21364604d5319600.svg b/plugin-test/css-extract/cases/publicpath-loader-auto/expected/61dc21364604d5319600.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-loader-auto/expected/61dc21364604d5319600.svg rename to plugin-test/css-extract/cases/publicpath-loader-auto/expected/61dc21364604d5319600.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-loader-auto/expected/main.css b/plugin-test/css-extract/cases/publicpath-loader-auto/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-loader-auto/expected/main.css rename to plugin-test/css-extract/cases/publicpath-loader-auto/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-loader-auto/index.js b/plugin-test/css-extract/cases/publicpath-loader-auto/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-loader-auto/index.js rename to plugin-test/css-extract/cases/publicpath-loader-auto/index.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-loader-auto/react.svg b/plugin-test/css-extract/cases/publicpath-loader-auto/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-loader-auto/react.svg rename to plugin-test/css-extract/cases/publicpath-loader-auto/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-loader-auto/style.css b/plugin-test/css-extract/cases/publicpath-loader-auto/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-loader-auto/style.css rename to plugin-test/css-extract/cases/publicpath-loader-auto/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-loader-auto/webpack.config.js b/plugin-test/css-extract/cases/publicpath-loader-auto/webpack.config.js similarity index 84% rename from packages/rspack/tests/cssExtract/cases/publicpath-loader-auto/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-loader-auto/webpack.config.js index 57ffe70d662..47f70bfef51 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-loader-auto/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-loader-auto/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-1/expected/61dc21364604d5319600.svg b/plugin-test/css-extract/cases/publicpath-path-relative-1/expected/61dc21364604d5319600.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-1/expected/61dc21364604d5319600.svg rename to plugin-test/css-extract/cases/publicpath-path-relative-1/expected/61dc21364604d5319600.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-1/expected/main.css b/plugin-test/css-extract/cases/publicpath-path-relative-1/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-1/expected/main.css rename to plugin-test/css-extract/cases/publicpath-path-relative-1/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-1/index.js b/plugin-test/css-extract/cases/publicpath-path-relative-1/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-1/index.js rename to plugin-test/css-extract/cases/publicpath-path-relative-1/index.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-1/react.svg b/plugin-test/css-extract/cases/publicpath-path-relative-1/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-1/react.svg rename to plugin-test/css-extract/cases/publicpath-path-relative-1/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-1/style.css b/plugin-test/css-extract/cases/publicpath-path-relative-1/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-1/style.css rename to plugin-test/css-extract/cases/publicpath-path-relative-1/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-1/webpack.config.js b/plugin-test/css-extract/cases/publicpath-path-relative-1/webpack.config.js similarity index 85% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-1/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-path-relative-1/webpack.config.js index 06b3dcc09ee..51bec8b42e5 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-1/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-path-relative-1/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-2/expected/61dc21364604d5319600.svg b/plugin-test/css-extract/cases/publicpath-path-relative-2/expected/61dc21364604d5319600.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-2/expected/61dc21364604d5319600.svg rename to plugin-test/css-extract/cases/publicpath-path-relative-2/expected/61dc21364604d5319600.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-2/expected/main.css b/plugin-test/css-extract/cases/publicpath-path-relative-2/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-2/expected/main.css rename to plugin-test/css-extract/cases/publicpath-path-relative-2/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-2/index.js b/plugin-test/css-extract/cases/publicpath-path-relative-2/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-2/index.js rename to plugin-test/css-extract/cases/publicpath-path-relative-2/index.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-2/react.svg b/plugin-test/css-extract/cases/publicpath-path-relative-2/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-2/react.svg rename to plugin-test/css-extract/cases/publicpath-path-relative-2/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-2/style.css b/plugin-test/css-extract/cases/publicpath-path-relative-2/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-2/style.css rename to plugin-test/css-extract/cases/publicpath-path-relative-2/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-2/webpack.config.js b/plugin-test/css-extract/cases/publicpath-path-relative-2/webpack.config.js similarity index 84% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-2/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-path-relative-2/webpack.config.js index 4a03f50afe3..70683374876 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-2/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-path-relative-2/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-3/expected/61dc21364604d5319600.svg b/plugin-test/css-extract/cases/publicpath-path-relative-3/expected/61dc21364604d5319600.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-3/expected/61dc21364604d5319600.svg rename to plugin-test/css-extract/cases/publicpath-path-relative-3/expected/61dc21364604d5319600.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-3/expected/main.css b/plugin-test/css-extract/cases/publicpath-path-relative-3/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-3/expected/main.css rename to plugin-test/css-extract/cases/publicpath-path-relative-3/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-3/index.js b/plugin-test/css-extract/cases/publicpath-path-relative-3/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-3/index.js rename to plugin-test/css-extract/cases/publicpath-path-relative-3/index.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-3/react.svg b/plugin-test/css-extract/cases/publicpath-path-relative-3/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-3/react.svg rename to plugin-test/css-extract/cases/publicpath-path-relative-3/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-3/style.css b/plugin-test/css-extract/cases/publicpath-path-relative-3/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-3/style.css rename to plugin-test/css-extract/cases/publicpath-path-relative-3/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-3/webpack.config.js b/plugin-test/css-extract/cases/publicpath-path-relative-3/webpack.config.js similarity index 84% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-3/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-path-relative-3/webpack.config.js index 79980a6727d..657c250acbe 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-3/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-path-relative-3/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-4/expected/61dc21364604d5319600.svg b/plugin-test/css-extract/cases/publicpath-path-relative-4/expected/61dc21364604d5319600.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-4/expected/61dc21364604d5319600.svg rename to plugin-test/css-extract/cases/publicpath-path-relative-4/expected/61dc21364604d5319600.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-4/expected/main.css b/plugin-test/css-extract/cases/publicpath-path-relative-4/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-4/expected/main.css rename to plugin-test/css-extract/cases/publicpath-path-relative-4/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-4/index.js b/plugin-test/css-extract/cases/publicpath-path-relative-4/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-4/index.js rename to plugin-test/css-extract/cases/publicpath-path-relative-4/index.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-4/react.svg b/plugin-test/css-extract/cases/publicpath-path-relative-4/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-4/react.svg rename to plugin-test/css-extract/cases/publicpath-path-relative-4/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-4/style.css b/plugin-test/css-extract/cases/publicpath-path-relative-4/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-4/style.css rename to plugin-test/css-extract/cases/publicpath-path-relative-4/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-4/webpack.config.js b/plugin-test/css-extract/cases/publicpath-path-relative-4/webpack.config.js similarity index 84% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-4/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-path-relative-4/webpack.config.js index 94d21b25981..1ba1c9706aa 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-4/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-path-relative-4/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-5/expected/61dc21364604d5319600.svg b/plugin-test/css-extract/cases/publicpath-path-relative-5/expected/61dc21364604d5319600.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-5/expected/61dc21364604d5319600.svg rename to plugin-test/css-extract/cases/publicpath-path-relative-5/expected/61dc21364604d5319600.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-5/expected/main.css b/plugin-test/css-extract/cases/publicpath-path-relative-5/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-5/expected/main.css rename to plugin-test/css-extract/cases/publicpath-path-relative-5/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-5/index.js b/plugin-test/css-extract/cases/publicpath-path-relative-5/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-5/index.js rename to plugin-test/css-extract/cases/publicpath-path-relative-5/index.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-5/react.svg b/plugin-test/css-extract/cases/publicpath-path-relative-5/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-5/react.svg rename to plugin-test/css-extract/cases/publicpath-path-relative-5/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-5/style.css b/plugin-test/css-extract/cases/publicpath-path-relative-5/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-5/style.css rename to plugin-test/css-extract/cases/publicpath-path-relative-5/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-5/webpack.config.js b/plugin-test/css-extract/cases/publicpath-path-relative-5/webpack.config.js similarity index 84% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-5/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-path-relative-5/webpack.config.js index 91b1137d80f..4db9534914d 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-5/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-path-relative-5/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-6/expected/61dc21364604d5319600.svg b/plugin-test/css-extract/cases/publicpath-path-relative-6/expected/61dc21364604d5319600.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-6/expected/61dc21364604d5319600.svg rename to plugin-test/css-extract/cases/publicpath-path-relative-6/expected/61dc21364604d5319600.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-6/expected/main.css b/plugin-test/css-extract/cases/publicpath-path-relative-6/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-6/expected/main.css rename to plugin-test/css-extract/cases/publicpath-path-relative-6/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-6/index.js b/plugin-test/css-extract/cases/publicpath-path-relative-6/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-6/index.js rename to plugin-test/css-extract/cases/publicpath-path-relative-6/index.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-6/react.svg b/plugin-test/css-extract/cases/publicpath-path-relative-6/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-6/react.svg rename to plugin-test/css-extract/cases/publicpath-path-relative-6/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-6/style.css b/plugin-test/css-extract/cases/publicpath-path-relative-6/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-6/style.css rename to plugin-test/css-extract/cases/publicpath-path-relative-6/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-6/webpack.config.js b/plugin-test/css-extract/cases/publicpath-path-relative-6/webpack.config.js similarity index 84% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-6/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-path-relative-6/webpack.config.js index 4460d178bb7..a52493e9cf7 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-6/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-path-relative-6/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-7/expected/61dc21364604d5319600.svg b/plugin-test/css-extract/cases/publicpath-path-relative-7/expected/61dc21364604d5319600.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-7/expected/61dc21364604d5319600.svg rename to plugin-test/css-extract/cases/publicpath-path-relative-7/expected/61dc21364604d5319600.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-7/expected/main.css b/plugin-test/css-extract/cases/publicpath-path-relative-7/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-7/expected/main.css rename to plugin-test/css-extract/cases/publicpath-path-relative-7/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-7/index.js b/plugin-test/css-extract/cases/publicpath-path-relative-7/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-7/index.js rename to plugin-test/css-extract/cases/publicpath-path-relative-7/index.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-7/react.svg b/plugin-test/css-extract/cases/publicpath-path-relative-7/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-7/react.svg rename to plugin-test/css-extract/cases/publicpath-path-relative-7/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-7/style.css b/plugin-test/css-extract/cases/publicpath-path-relative-7/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-7/style.css rename to plugin-test/css-extract/cases/publicpath-path-relative-7/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-7/webpack.config.js b/plugin-test/css-extract/cases/publicpath-path-relative-7/webpack.config.js similarity index 84% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative-7/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-path-relative-7/webpack.config.js index 0552a549b04..0f087762913 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative-7/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-path-relative-7/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative/expected/61dc21364604d5319600.svg b/plugin-test/css-extract/cases/publicpath-path-relative/expected/61dc21364604d5319600.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative/expected/61dc21364604d5319600.svg rename to plugin-test/css-extract/cases/publicpath-path-relative/expected/61dc21364604d5319600.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative/expected/main.css b/plugin-test/css-extract/cases/publicpath-path-relative/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative/expected/main.css rename to plugin-test/css-extract/cases/publicpath-path-relative/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative/index.js b/plugin-test/css-extract/cases/publicpath-path-relative/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative/index.js rename to plugin-test/css-extract/cases/publicpath-path-relative/index.js diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative/react.svg b/plugin-test/css-extract/cases/publicpath-path-relative/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative/react.svg rename to plugin-test/css-extract/cases/publicpath-path-relative/react.svg diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative/style.css b/plugin-test/css-extract/cases/publicpath-path-relative/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative/style.css rename to plugin-test/css-extract/cases/publicpath-path-relative/style.css diff --git a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative/webpack.config.js b/plugin-test/css-extract/cases/publicpath-path-relative/webpack.config.js similarity index 84% rename from packages/rspack/tests/cssExtract/cases/publicpath-path-relative/webpack.config.js rename to plugin-test/css-extract/cases/publicpath-path-relative/webpack.config.js index 70e8d8117ff..8dd38cf63f2 100644 --- a/packages/rspack/tests/cssExtract/cases/publicpath-path-relative/webpack.config.js +++ b/plugin-test/css-extract/cases/publicpath-path-relative/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/runtime/async.js b/plugin-test/css-extract/cases/runtime/async.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/runtime/async.js rename to plugin-test/css-extract/cases/runtime/async.js diff --git a/packages/rspack/tests/cssExtract/cases/runtime/expected/main.css b/plugin-test/css-extract/cases/runtime/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/runtime/expected/main.css rename to plugin-test/css-extract/cases/runtime/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/runtime/expected/runtime~main.js b/plugin-test/css-extract/cases/runtime/expected/runtime~main.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/runtime/expected/runtime~main.js rename to plugin-test/css-extract/cases/runtime/expected/runtime~main.js diff --git a/packages/rspack/tests/cssExtract/cases/runtime/index.js b/plugin-test/css-extract/cases/runtime/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/runtime/index.js rename to plugin-test/css-extract/cases/runtime/index.js diff --git a/packages/rspack/tests/cssExtract/cases/runtime/style.css b/plugin-test/css-extract/cases/runtime/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/runtime/style.css rename to plugin-test/css-extract/cases/runtime/style.css diff --git a/packages/rspack/tests/cssExtract/cases/runtime/webpack.config.js b/plugin-test/css-extract/cases/runtime/webpack.config.js similarity index 85% rename from packages/rspack/tests/cssExtract/cases/runtime/webpack.config.js rename to plugin-test/css-extract/cases/runtime/webpack.config.js index ef527450e7b..988904183e8 100644 --- a/packages/rspack/tests/cssExtract/cases/runtime/webpack.config.js +++ b/plugin-test/css-extract/cases/runtime/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/shared-import/a.css b/plugin-test/css-extract/cases/shared-import/a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/shared-import/a.css rename to plugin-test/css-extract/cases/shared-import/a.css diff --git a/packages/rspack/tests/cssExtract/cases/shared-import/b.css b/plugin-test/css-extract/cases/shared-import/b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/shared-import/b.css rename to plugin-test/css-extract/cases/shared-import/b.css diff --git a/packages/rspack/tests/cssExtract/cases/shared-import/c.css b/plugin-test/css-extract/cases/shared-import/c.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/shared-import/c.css rename to plugin-test/css-extract/cases/shared-import/c.css diff --git a/packages/rspack/tests/cssExtract/cases/shared-import/expected/c_css.css b/plugin-test/css-extract/cases/shared-import/expected/c_css.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/shared-import/expected/c_css.css rename to plugin-test/css-extract/cases/shared-import/expected/c_css.css diff --git a/packages/rspack/tests/cssExtract/cases/shared-import/expected/main.css b/plugin-test/css-extract/cases/shared-import/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/shared-import/expected/main.css rename to plugin-test/css-extract/cases/shared-import/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/shared-import/index.js b/plugin-test/css-extract/cases/shared-import/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/shared-import/index.js rename to plugin-test/css-extract/cases/shared-import/index.js diff --git a/packages/rspack/tests/cssExtract/cases/shared-import/shared.css b/plugin-test/css-extract/cases/shared-import/shared.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/shared-import/shared.css rename to plugin-test/css-extract/cases/shared-import/shared.css diff --git a/plugin-test/css-extract/cases/shared-import/webpack.config.js b/plugin-test/css-extract/cases/shared-import/webpack.config.js new file mode 100644 index 00000000000..bc1745072da --- /dev/null +++ b/plugin-test/css-extract/cases/shared-import/webpack.config.js @@ -0,0 +1,18 @@ +const { CssExtractRspackPlugin } = require("@rspack/core"); + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [CssExtractRspackPlugin.loader, "css-loader"] + } + ] + }, + plugins: [ + new CssExtractRspackPlugin({ + filename: "[name].css" + }) + ] +}; diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/a.css b/plugin-test/css-extract/cases/simple-async-load-css-fallback/a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/a.css rename to plugin-test/css-extract/cases/simple-async-load-css-fallback/a.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/async-one.js b/plugin-test/css-extract/cases/simple-async-load-css-fallback/async-one.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/async-one.js rename to plugin-test/css-extract/cases/simple-async-load-css-fallback/async-one.js diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/async-two.js b/plugin-test/css-extract/cases/simple-async-load-css-fallback/async-two.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/async-two.js rename to plugin-test/css-extract/cases/simple-async-load-css-fallback/async-two.js diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/b.css b/plugin-test/css-extract/cases/simple-async-load-css-fallback/b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/b.css rename to plugin-test/css-extract/cases/simple-async-load-css-fallback/b.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/c.css b/plugin-test/css-extract/cases/simple-async-load-css-fallback/c.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/c.css rename to plugin-test/css-extract/cases/simple-async-load-css-fallback/c.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/d.css b/plugin-test/css-extract/cases/simple-async-load-css-fallback/d.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/d.css rename to plugin-test/css-extract/cases/simple-async-load-css-fallback/d.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/e.css b/plugin-test/css-extract/cases/simple-async-load-css-fallback/e.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/e.css rename to plugin-test/css-extract/cases/simple-async-load-css-fallback/e.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/expected/async-one.css b/plugin-test/css-extract/cases/simple-async-load-css-fallback/expected/async-one.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/expected/async-one.css rename to plugin-test/css-extract/cases/simple-async-load-css-fallback/expected/async-one.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/expected/async-two.css b/plugin-test/css-extract/cases/simple-async-load-css-fallback/expected/async-two.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/expected/async-two.css rename to plugin-test/css-extract/cases/simple-async-load-css-fallback/expected/async-two.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/expected/main.css b/plugin-test/css-extract/cases/simple-async-load-css-fallback/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/expected/main.css rename to plugin-test/css-extract/cases/simple-async-load-css-fallback/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/f.css b/plugin-test/css-extract/cases/simple-async-load-css-fallback/f.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/f.css rename to plugin-test/css-extract/cases/simple-async-load-css-fallback/f.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/index.js b/plugin-test/css-extract/cases/simple-async-load-css-fallback/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/index.js rename to plugin-test/css-extract/cases/simple-async-load-css-fallback/index.js diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/webpack.config.js b/plugin-test/css-extract/cases/simple-async-load-css-fallback/webpack.config.js similarity index 91% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/webpack.config.js rename to plugin-test/css-extract/cases/simple-async-load-css-fallback/webpack.config.js index ee59fbb6039..8c7c9028108 100644 --- a/packages/rspack/tests/cssExtract/cases/simple-async-load-css-fallback/webpack.config.js +++ b/plugin-test/css-extract/cases/simple-async-load-css-fallback/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: { diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css/a.css b/plugin-test/css-extract/cases/simple-async-load-css/a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css/a.css rename to plugin-test/css-extract/cases/simple-async-load-css/a.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css/async-one.js b/plugin-test/css-extract/cases/simple-async-load-css/async-one.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css/async-one.js rename to plugin-test/css-extract/cases/simple-async-load-css/async-one.js diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css/async-two.js b/plugin-test/css-extract/cases/simple-async-load-css/async-two.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css/async-two.js rename to plugin-test/css-extract/cases/simple-async-load-css/async-two.js diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css/b.css b/plugin-test/css-extract/cases/simple-async-load-css/b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css/b.css rename to plugin-test/css-extract/cases/simple-async-load-css/b.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css/c.css b/plugin-test/css-extract/cases/simple-async-load-css/c.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css/c.css rename to plugin-test/css-extract/cases/simple-async-load-css/c.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css/d.css b/plugin-test/css-extract/cases/simple-async-load-css/d.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css/d.css rename to plugin-test/css-extract/cases/simple-async-load-css/d.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css/e.css b/plugin-test/css-extract/cases/simple-async-load-css/e.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css/e.css rename to plugin-test/css-extract/cases/simple-async-load-css/e.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css/expected/async-one.css b/plugin-test/css-extract/cases/simple-async-load-css/expected/async-one.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css/expected/async-one.css rename to plugin-test/css-extract/cases/simple-async-load-css/expected/async-one.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css/expected/async-two.css b/plugin-test/css-extract/cases/simple-async-load-css/expected/async-two.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css/expected/async-two.css rename to plugin-test/css-extract/cases/simple-async-load-css/expected/async-two.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css/expected/main.css b/plugin-test/css-extract/cases/simple-async-load-css/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css/expected/main.css rename to plugin-test/css-extract/cases/simple-async-load-css/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css/f.css b/plugin-test/css-extract/cases/simple-async-load-css/f.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css/f.css rename to plugin-test/css-extract/cases/simple-async-load-css/f.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css/index.js b/plugin-test/css-extract/cases/simple-async-load-css/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css/index.js rename to plugin-test/css-extract/cases/simple-async-load-css/index.js diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-load-css/webpack.config.js b/plugin-test/css-extract/cases/simple-async-load-css/webpack.config.js similarity index 80% rename from packages/rspack/tests/cssExtract/cases/simple-async-load-css/webpack.config.js rename to plugin-test/css-extract/cases/simple-async-load-css/webpack.config.js index 1503d2b1d5d..02df75464ae 100644 --- a/packages/rspack/tests/cssExtract/cases/simple-async-load-css/webpack.config.js +++ b/plugin-test/css-extract/cases/simple-async-load-css/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: { diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-source-map/async.css b/plugin-test/css-extract/cases/simple-async-source-map/async.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-source-map/async.css rename to plugin-test/css-extract/cases/simple-async-source-map/async.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-source-map/async.js b/plugin-test/css-extract/cases/simple-async-source-map/async.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-source-map/async.js rename to plugin-test/css-extract/cases/simple-async-source-map/async.js diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-source-map/expected/async_css.css b/plugin-test/css-extract/cases/simple-async-source-map/expected/async_css.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-source-map/expected/async_css.css rename to plugin-test/css-extract/cases/simple-async-source-map/expected/async_css.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-source-map/expected/async_css.css.map b/plugin-test/css-extract/cases/simple-async-source-map/expected/async_css.css.map similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-source-map/expected/async_css.css.map rename to plugin-test/css-extract/cases/simple-async-source-map/expected/async_css.css.map diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-source-map/expected/async_js.css b/plugin-test/css-extract/cases/simple-async-source-map/expected/async_js.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-source-map/expected/async_js.css rename to plugin-test/css-extract/cases/simple-async-source-map/expected/async_js.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-source-map/expected/async_js.css.map b/plugin-test/css-extract/cases/simple-async-source-map/expected/async_js.css.map similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-source-map/expected/async_js.css.map rename to plugin-test/css-extract/cases/simple-async-source-map/expected/async_js.css.map diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-source-map/expected/main.css b/plugin-test/css-extract/cases/simple-async-source-map/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-source-map/expected/main.css rename to plugin-test/css-extract/cases/simple-async-source-map/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-source-map/expected/main.css.map b/plugin-test/css-extract/cases/simple-async-source-map/expected/main.css.map similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-source-map/expected/main.css.map rename to plugin-test/css-extract/cases/simple-async-source-map/expected/main.css.map diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-source-map/in-async.css b/plugin-test/css-extract/cases/simple-async-source-map/in-async.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-source-map/in-async.css rename to plugin-test/css-extract/cases/simple-async-source-map/in-async.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-source-map/index.js b/plugin-test/css-extract/cases/simple-async-source-map/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-source-map/index.js rename to plugin-test/css-extract/cases/simple-async-source-map/index.js diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-source-map/main.css b/plugin-test/css-extract/cases/simple-async-source-map/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async-source-map/main.css rename to plugin-test/css-extract/cases/simple-async-source-map/main.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async-source-map/webpack.config.js b/plugin-test/css-extract/cases/simple-async-source-map/webpack.config.js similarity index 81% rename from packages/rspack/tests/cssExtract/cases/simple-async-source-map/webpack.config.js rename to plugin-test/css-extract/cases/simple-async-source-map/webpack.config.js index ab9ae922291..db02e37ea0e 100644 --- a/packages/rspack/tests/cssExtract/cases/simple-async-source-map/webpack.config.js +++ b/plugin-test/css-extract/cases/simple-async-source-map/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/simple-async/async.css b/plugin-test/css-extract/cases/simple-async/async.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async/async.css rename to plugin-test/css-extract/cases/simple-async/async.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async/async.js b/plugin-test/css-extract/cases/simple-async/async.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async/async.js rename to plugin-test/css-extract/cases/simple-async/async.js diff --git a/packages/rspack/tests/cssExtract/cases/simple-async/expected/async_css.css b/plugin-test/css-extract/cases/simple-async/expected/async_css.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async/expected/async_css.css rename to plugin-test/css-extract/cases/simple-async/expected/async_css.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async/expected/async_js.css b/plugin-test/css-extract/cases/simple-async/expected/async_js.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async/expected/async_js.css rename to plugin-test/css-extract/cases/simple-async/expected/async_js.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async/expected/main.css b/plugin-test/css-extract/cases/simple-async/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async/expected/main.css rename to plugin-test/css-extract/cases/simple-async/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async/in-async.css b/plugin-test/css-extract/cases/simple-async/in-async.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async/in-async.css rename to plugin-test/css-extract/cases/simple-async/in-async.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-async/index.js b/plugin-test/css-extract/cases/simple-async/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async/index.js rename to plugin-test/css-extract/cases/simple-async/index.js diff --git a/packages/rspack/tests/cssExtract/cases/simple-async/main.css b/plugin-test/css-extract/cases/simple-async/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-async/main.css rename to plugin-test/css-extract/cases/simple-async/main.css diff --git a/plugin-test/css-extract/cases/simple-async/webpack.config.js b/plugin-test/css-extract/cases/simple-async/webpack.config.js new file mode 100644 index 00000000000..bc1745072da --- /dev/null +++ b/plugin-test/css-extract/cases/simple-async/webpack.config.js @@ -0,0 +1,18 @@ +const { CssExtractRspackPlugin } = require("@rspack/core"); + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [CssExtractRspackPlugin.loader, "css-loader"] + } + ] + }, + plugins: [ + new CssExtractRspackPlugin({ + filename: "[name].css" + }) + ] +}; diff --git a/packages/rspack/tests/cssExtract/cases/simple-commonjs-syntax/expected/main.css b/plugin-test/css-extract/cases/simple-commonjs-syntax/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-commonjs-syntax/expected/main.css rename to plugin-test/css-extract/cases/simple-commonjs-syntax/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-commonjs-syntax/index.js b/plugin-test/css-extract/cases/simple-commonjs-syntax/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-commonjs-syntax/index.js rename to plugin-test/css-extract/cases/simple-commonjs-syntax/index.js diff --git a/packages/rspack/tests/cssExtract/cases/simple-commonjs-syntax/style.css b/plugin-test/css-extract/cases/simple-commonjs-syntax/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-commonjs-syntax/style.css rename to plugin-test/css-extract/cases/simple-commonjs-syntax/style.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-commonjs-syntax/webpack.config.js b/plugin-test/css-extract/cases/simple-commonjs-syntax/webpack.config.js similarity index 86% rename from packages/rspack/tests/cssExtract/cases/simple-commonjs-syntax/webpack.config.js rename to plugin-test/css-extract/cases/simple-commonjs-syntax/webpack.config.js index 1e81bafa283..d407067b18e 100644 --- a/packages/rspack/tests/cssExtract/cases/simple-commonjs-syntax/webpack.config.js +++ b/plugin-test/css-extract/cases/simple-commonjs-syntax/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-global/expected/main.css b/plugin-test/css-extract/cases/simple-css-modules-mode-global/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-global/expected/main.css rename to plugin-test/css-extract/cases/simple-css-modules-mode-global/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-global/index.js b/plugin-test/css-extract/cases/simple-css-modules-mode-global/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-global/index.js rename to plugin-test/css-extract/cases/simple-css-modules-mode-global/index.js diff --git a/packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-global/style.css b/plugin-test/css-extract/cases/simple-css-modules-mode-global/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-global/style.css rename to plugin-test/css-extract/cases/simple-css-modules-mode-global/style.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-global/webpack.config.js b/plugin-test/css-extract/cases/simple-css-modules-mode-global/webpack.config.js similarity index 86% rename from packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-global/webpack.config.js rename to plugin-test/css-extract/cases/simple-css-modules-mode-global/webpack.config.js index 48a9e5a8c43..74b3553f200 100644 --- a/packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-global/webpack.config.js +++ b/plugin-test/css-extract/cases/simple-css-modules-mode-global/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-local-output-module/expected/main.css b/plugin-test/css-extract/cases/simple-css-modules-mode-local-output-module/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-local-output-module/expected/main.css rename to plugin-test/css-extract/cases/simple-css-modules-mode-local-output-module/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-local-output-module/index.js b/plugin-test/css-extract/cases/simple-css-modules-mode-local-output-module/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-local-output-module/index.js rename to plugin-test/css-extract/cases/simple-css-modules-mode-local-output-module/index.js diff --git a/packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-local-output-module/style.css b/plugin-test/css-extract/cases/simple-css-modules-mode-local-output-module/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-local-output-module/style.css rename to plugin-test/css-extract/cases/simple-css-modules-mode-local-output-module/style.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-local-output-module/webpack.config.js b/plugin-test/css-extract/cases/simple-css-modules-mode-local-output-module/webpack.config.js similarity index 88% rename from packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-local-output-module/webpack.config.js rename to plugin-test/css-extract/cases/simple-css-modules-mode-local-output-module/webpack.config.js index 12d741f9291..b93e95d9864 100644 --- a/packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-local-output-module/webpack.config.js +++ b/plugin-test/css-extract/cases/simple-css-modules-mode-local-output-module/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-local/expected/main.css b/plugin-test/css-extract/cases/simple-css-modules-mode-local/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-local/expected/main.css rename to plugin-test/css-extract/cases/simple-css-modules-mode-local/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-local/index.js b/plugin-test/css-extract/cases/simple-css-modules-mode-local/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-local/index.js rename to plugin-test/css-extract/cases/simple-css-modules-mode-local/index.js diff --git a/packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-local/style.css b/plugin-test/css-extract/cases/simple-css-modules-mode-local/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-local/style.css rename to plugin-test/css-extract/cases/simple-css-modules-mode-local/style.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-local/webpack.config.js b/plugin-test/css-extract/cases/simple-css-modules-mode-local/webpack.config.js similarity index 86% rename from packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-local/webpack.config.js rename to plugin-test/css-extract/cases/simple-css-modules-mode-local/webpack.config.js index b77b69970ee..1dce959c162 100644 --- a/packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-local/webpack.config.js +++ b/plugin-test/css-extract/cases/simple-css-modules-mode-local/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-pure/expected/main.css b/plugin-test/css-extract/cases/simple-css-modules-mode-pure/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-pure/expected/main.css rename to plugin-test/css-extract/cases/simple-css-modules-mode-pure/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-pure/index.js b/plugin-test/css-extract/cases/simple-css-modules-mode-pure/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-pure/index.js rename to plugin-test/css-extract/cases/simple-css-modules-mode-pure/index.js diff --git a/packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-pure/style.css b/plugin-test/css-extract/cases/simple-css-modules-mode-pure/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-pure/style.css rename to plugin-test/css-extract/cases/simple-css-modules-mode-pure/style.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-pure/webpack.config.js b/plugin-test/css-extract/cases/simple-css-modules-mode-pure/webpack.config.js similarity index 86% rename from packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-pure/webpack.config.js rename to plugin-test/css-extract/cases/simple-css-modules-mode-pure/webpack.config.js index e8d2d0fe0c5..5b5288cf6d2 100644 --- a/packages/rspack/tests/cssExtract/cases/simple-css-modules-mode-pure/webpack.config.js +++ b/plugin-test/css-extract/cases/simple-css-modules-mode-pure/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/simple-es-module-syntax/expected/main.css b/plugin-test/css-extract/cases/simple-es-module-syntax/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-es-module-syntax/expected/main.css rename to plugin-test/css-extract/cases/simple-es-module-syntax/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-es-module-syntax/index.js b/plugin-test/css-extract/cases/simple-es-module-syntax/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-es-module-syntax/index.js rename to plugin-test/css-extract/cases/simple-es-module-syntax/index.js diff --git a/packages/rspack/tests/cssExtract/cases/simple-es-module-syntax/style.css b/plugin-test/css-extract/cases/simple-es-module-syntax/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-es-module-syntax/style.css rename to plugin-test/css-extract/cases/simple-es-module-syntax/style.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-es-module-syntax/webpack.config.js b/plugin-test/css-extract/cases/simple-es-module-syntax/webpack.config.js similarity index 86% rename from packages/rspack/tests/cssExtract/cases/simple-es-module-syntax/webpack.config.js rename to plugin-test/css-extract/cases/simple-es-module-syntax/webpack.config.js index 22aabc13d39..4068129c896 100644 --- a/packages/rspack/tests/cssExtract/cases/simple-es-module-syntax/webpack.config.js +++ b/plugin-test/css-extract/cases/simple-es-module-syntax/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/simple-multiple/a.css b/plugin-test/css-extract/cases/simple-multiple/a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-multiple/a.css rename to plugin-test/css-extract/cases/simple-multiple/a.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-multiple/b.css b/plugin-test/css-extract/cases/simple-multiple/b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-multiple/b.css rename to plugin-test/css-extract/cases/simple-multiple/b.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-multiple/expected/main.css b/plugin-test/css-extract/cases/simple-multiple/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-multiple/expected/main.css rename to plugin-test/css-extract/cases/simple-multiple/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/simple-multiple/index.js b/plugin-test/css-extract/cases/simple-multiple/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple-multiple/index.js rename to plugin-test/css-extract/cases/simple-multiple/index.js diff --git a/plugin-test/css-extract/cases/simple-multiple/webpack.config.js b/plugin-test/css-extract/cases/simple-multiple/webpack.config.js new file mode 100644 index 00000000000..bc1745072da --- /dev/null +++ b/plugin-test/css-extract/cases/simple-multiple/webpack.config.js @@ -0,0 +1,18 @@ +const { CssExtractRspackPlugin } = require("@rspack/core"); + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [CssExtractRspackPlugin.loader, "css-loader"] + } + ] + }, + plugins: [ + new CssExtractRspackPlugin({ + filename: "[name].css" + }) + ] +}; diff --git a/packages/rspack/tests/cssExtract/cases/simple/expected/main.css b/plugin-test/css-extract/cases/simple/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple/expected/main.css rename to plugin-test/css-extract/cases/simple/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/simple/index.js b/plugin-test/css-extract/cases/simple/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple/index.js rename to plugin-test/css-extract/cases/simple/index.js diff --git a/packages/rspack/tests/cssExtract/cases/simple/style.css b/plugin-test/css-extract/cases/simple/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/simple/style.css rename to plugin-test/css-extract/cases/simple/style.css diff --git a/plugin-test/css-extract/cases/simple/webpack.config.js b/plugin-test/css-extract/cases/simple/webpack.config.js new file mode 100644 index 00000000000..bc1745072da --- /dev/null +++ b/plugin-test/css-extract/cases/simple/webpack.config.js @@ -0,0 +1,18 @@ +const { CssExtractRspackPlugin } = require("@rspack/core"); + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [CssExtractRspackPlugin.loader, "css-loader"] + } + ] + }, + plugins: [ + new CssExtractRspackPlugin({ + filename: "[name].css" + }) + ] +}; diff --git a/packages/rspack/tests/cssExtract/cases/source-map/expected/main.css b/plugin-test/css-extract/cases/source-map/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/source-map/expected/main.css rename to plugin-test/css-extract/cases/source-map/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/source-map/index.js b/plugin-test/css-extract/cases/source-map/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/source-map/index.js rename to plugin-test/css-extract/cases/source-map/index.js diff --git a/packages/rspack/tests/cssExtract/cases/source-map/style.css b/plugin-test/css-extract/cases/source-map/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/source-map/style.css rename to plugin-test/css-extract/cases/source-map/style.css diff --git a/packages/rspack/tests/cssExtract/cases/source-map/webpack.config.js b/plugin-test/css-extract/cases/source-map/webpack.config.js similarity index 86% rename from packages/rspack/tests/cssExtract/cases/source-map/webpack.config.js rename to plugin-test/css-extract/cases/source-map/webpack.config.js index 24ed458a729..5bb9da70424 100644 --- a/packages/rspack/tests/cssExtract/cases/source-map/webpack.config.js +++ b/plugin-test/css-extract/cases/source-map/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-all/a.js b/plugin-test/css-extract/cases/split-chunks-all/a.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-all/a.js rename to plugin-test/css-extract/cases/split-chunks-all/a.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-all/b.js b/plugin-test/css-extract/cases/split-chunks-all/b.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-all/b.js rename to plugin-test/css-extract/cases/split-chunks-all/b.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-all/expected/2.js b/plugin-test/css-extract/cases/split-chunks-all/expected/2.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-all/expected/2.js rename to plugin-test/css-extract/cases/split-chunks-all/expected/2.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-all/expected/styles-style_css.css b/plugin-test/css-extract/cases/split-chunks-all/expected/styles-style_css.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-all/expected/styles-style_css.css rename to plugin-test/css-extract/cases/split-chunks-all/expected/styles-style_css.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-all/index.js b/plugin-test/css-extract/cases/split-chunks-all/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-all/index.js rename to plugin-test/css-extract/cases/split-chunks-all/index.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-all/style.css b/plugin-test/css-extract/cases/split-chunks-all/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-all/style.css rename to plugin-test/css-extract/cases/split-chunks-all/style.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-all/webpack.config.js b/plugin-test/css-extract/cases/split-chunks-all/webpack.config.js similarity index 86% rename from packages/rspack/tests/cssExtract/cases/split-chunks-all/webpack.config.js rename to plugin-test/css-extract/cases/split-chunks-all/webpack.config.js index ce6e330cf6e..297cb7501ed 100644 --- a/packages/rspack/tests/cssExtract/cases/split-chunks-all/webpack.config.js +++ b/plugin-test/css-extract/cases/split-chunks-all/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: { diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/a.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/a.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/a.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/a.js b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/a.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/a.js rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/a.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/b.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/b.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/b.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/b.js b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/b.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/b.js rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/b.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/common.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/common.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/common.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/common.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/common.js b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/common.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/common.js rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/common.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp1.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp1.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp1.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp1.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp1.js b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp1.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp1.js rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp1.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp2.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp2.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp2.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp2.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp2.js b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp2.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp2.js rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp2.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/a/index.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/a/index.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/a/index.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/a/index.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/b/index.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/b/index.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/b/index.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/b/index.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/common/index.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/common/index.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/common/index.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/common/index.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/comp1/index.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/comp1/index.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/comp1/index.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/comp1/index.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/comp2/index.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/comp2/index.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/comp2/index.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/comp2/index.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/webpack.config.js b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/webpack.config.js similarity index 91% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/webpack.config.js rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/webpack.config.js index 048fceb6e76..916e725f803 100644 --- a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/webpack.config.js +++ b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: { diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/a.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/a.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/a.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/a.js b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/a.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/a.js rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/a.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/b.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/b.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/b.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/b.js b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/b.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/b.js rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/b.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/common.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/common.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/common.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/common.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/common.js b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/common.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/common.js rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/common.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/components/comp1.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/components/comp1.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/components/comp1.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/components/comp1.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/components/comp1.js b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/components/comp1.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/components/comp1.js rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/components/comp1.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/components/comp2.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/components/comp2.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/components/comp2.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/components/comp2.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/components/comp2.js b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/components/comp2.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/components/comp2.js rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/components/comp2.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/expected/common.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/expected/common.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/expected/common.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/expected/common.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/expected/comp1.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/expected/comp1.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/expected/comp1.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/expected/comp1.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/expected/comp2.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/expected/comp2.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/expected/comp2.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/expected/comp2.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/expected/styles_a.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/expected/styles_a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/expected/styles_a.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/expected/styles_a.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/expected/styles_b.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/expected/styles_b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/expected/styles_b.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/expected/styles_b.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/webpack.config.js b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/webpack.config.js similarity index 90% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/webpack.config.js rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/webpack.config.js index f66c2295aa6..4078269d9a6 100644 --- a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/webpack.config.js +++ b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-chunk/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: { diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/a.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/a.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/a.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/a.js b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/a.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/a.js rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/a.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/b.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/b.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/b.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/b.js b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/b.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/b.js rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/b.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/common.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/common.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/common.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/common.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp1.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp1.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp1.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp1.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp1.js b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp1.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp1.js rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp1.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp2.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp2.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp2.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp2.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp2.js b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp2.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp2.js rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp2.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/comp1.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/comp1.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/comp1.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/comp1.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/comp2.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/comp2.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/comp2.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/comp2.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/styles_a.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/styles_a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/styles_a.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/styles_a.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/styles_b.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/styles_b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/styles_b.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/styles_b.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/webpack.config.js b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/webpack.config.js similarity index 90% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/webpack.config.js rename to plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/webpack.config.js index f66c2295aa6..4078269d9a6 100644 --- a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-chunk/webpack.config.js +++ b/plugin-test/css-extract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: { diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/a.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry/a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/a.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry/a.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/a.js b/plugin-test/css-extract/cases/split-chunks-based-on-entry/a.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/a.js rename to plugin-test/css-extract/cases/split-chunks-based-on-entry/a.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/b.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry/b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/b.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry/b.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/b.js b/plugin-test/css-extract/cases/split-chunks-based-on-entry/b.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/b.js rename to plugin-test/css-extract/cases/split-chunks-based-on-entry/b.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/components/comp1.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry/components/comp1.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/components/comp1.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry/components/comp1.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/components/comp1.js b/plugin-test/css-extract/cases/split-chunks-based-on-entry/components/comp1.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/components/comp1.js rename to plugin-test/css-extract/cases/split-chunks-based-on-entry/components/comp1.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/components/comp2.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry/components/comp2.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/components/comp2.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry/components/comp2.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/components/comp2.js b/plugin-test/css-extract/cases/split-chunks-based-on-entry/components/comp2.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/components/comp2.js rename to plugin-test/css-extract/cases/split-chunks-based-on-entry/components/comp2.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/expected/comp1.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry/expected/comp1.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/expected/comp1.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry/expected/comp1.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/expected/comp2.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry/expected/comp2.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/expected/comp2.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry/expected/comp2.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/expected/styles_a.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry/expected/styles_a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/expected/styles_a.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry/expected/styles_a.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/expected/styles_b.css b/plugin-test/css-extract/cases/split-chunks-based-on-entry/expected/styles_b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry/expected/styles_b.css rename to plugin-test/css-extract/cases/split-chunks-based-on-entry/expected/styles_b.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/webpack.config.js b/plugin-test/css-extract/cases/split-chunks-based-on-entry/webpack.config.js similarity index 90% rename from packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/webpack.config.js rename to plugin-test/css-extract/cases/split-chunks-based-on-entry/webpack.config.js index f66c2295aa6..4078269d9a6 100644 --- a/packages/rspack/tests/cssExtract/cases/split-chunks-based-on-entry-with-common-in-each-chunk/webpack.config.js +++ b/plugin-test/css-extract/cases/split-chunks-based-on-entry/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: { diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-no-vendor/expected/bundle.css b/plugin-test/css-extract/cases/split-chunks-no-vendor/expected/bundle.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-no-vendor/expected/bundle.css rename to plugin-test/css-extract/cases/split-chunks-no-vendor/expected/bundle.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-no-vendor/index.js b/plugin-test/css-extract/cases/split-chunks-no-vendor/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-no-vendor/index.js rename to plugin-test/css-extract/cases/split-chunks-no-vendor/index.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-no-vendor/node_modules/bootstrap/bootstrap.css b/plugin-test/css-extract/cases/split-chunks-no-vendor/node_modules/bootstrap/bootstrap.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-no-vendor/node_modules/bootstrap/bootstrap.css rename to plugin-test/css-extract/cases/split-chunks-no-vendor/node_modules/bootstrap/bootstrap.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-no-vendor/node_modules/other-css/other.css b/plugin-test/css-extract/cases/split-chunks-no-vendor/node_modules/other-css/other.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-no-vendor/node_modules/other-css/other.css rename to plugin-test/css-extract/cases/split-chunks-no-vendor/node_modules/other-css/other.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-no-vendor/node_modules/package/index.js b/plugin-test/css-extract/cases/split-chunks-no-vendor/node_modules/package/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-no-vendor/node_modules/package/index.js rename to plugin-test/css-extract/cases/split-chunks-no-vendor/node_modules/package/index.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-no-vendor/style.css b/plugin-test/css-extract/cases/split-chunks-no-vendor/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-no-vendor/style.css rename to plugin-test/css-extract/cases/split-chunks-no-vendor/style.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-no-vendor/webpack.config.js b/plugin-test/css-extract/cases/split-chunks-no-vendor/webpack.config.js similarity index 91% rename from packages/rspack/tests/cssExtract/cases/split-chunks-no-vendor/webpack.config.js rename to plugin-test/css-extract/cases/split-chunks-no-vendor/webpack.config.js index 43f1b7ca806..b2229434f3e 100644 --- a/packages/rspack/tests/cssExtract/cases/split-chunks-no-vendor/webpack.config.js +++ b/plugin-test/css-extract/cases/split-chunks-no-vendor/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/a.css b/plugin-test/css-extract/cases/split-chunks-recursiveIssuer/a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/a.css rename to plugin-test/css-extract/cases/split-chunks-recursiveIssuer/a.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/a.js b/plugin-test/css-extract/cases/split-chunks-recursiveIssuer/a.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/a.js rename to plugin-test/css-extract/cases/split-chunks-recursiveIssuer/a.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/b.css b/plugin-test/css-extract/cases/split-chunks-recursiveIssuer/b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/b.css rename to plugin-test/css-extract/cases/split-chunks-recursiveIssuer/b.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/b.js b/plugin-test/css-extract/cases/split-chunks-recursiveIssuer/b.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/b.js rename to plugin-test/css-extract/cases/split-chunks-recursiveIssuer/b.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/components/comp1.css b/plugin-test/css-extract/cases/split-chunks-recursiveIssuer/components/comp1.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/components/comp1.css rename to plugin-test/css-extract/cases/split-chunks-recursiveIssuer/components/comp1.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/components/comp1.js b/plugin-test/css-extract/cases/split-chunks-recursiveIssuer/components/comp1.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/components/comp1.js rename to plugin-test/css-extract/cases/split-chunks-recursiveIssuer/components/comp1.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/components/comp2.css b/plugin-test/css-extract/cases/split-chunks-recursiveIssuer/components/comp2.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/components/comp2.css rename to plugin-test/css-extract/cases/split-chunks-recursiveIssuer/components/comp2.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/components/comp2.js b/plugin-test/css-extract/cases/split-chunks-recursiveIssuer/components/comp2.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/components/comp2.js rename to plugin-test/css-extract/cases/split-chunks-recursiveIssuer/components/comp2.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/expected/styles_a.css b/plugin-test/css-extract/cases/split-chunks-recursiveIssuer/expected/styles_a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/expected/styles_a.css rename to plugin-test/css-extract/cases/split-chunks-recursiveIssuer/expected/styles_a.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/expected/styles_b.css b/plugin-test/css-extract/cases/split-chunks-recursiveIssuer/expected/styles_b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/expected/styles_b.css rename to plugin-test/css-extract/cases/split-chunks-recursiveIssuer/expected/styles_b.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/test.filter.js b/plugin-test/css-extract/cases/split-chunks-recursiveIssuer/test.filter.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/test.filter.js rename to plugin-test/css-extract/cases/split-chunks-recursiveIssuer/test.filter.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/webpack.config.js b/plugin-test/css-extract/cases/split-chunks-recursiveIssuer/webpack.config.js similarity index 94% rename from packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/webpack.config.js rename to plugin-test/css-extract/cases/split-chunks-recursiveIssuer/webpack.config.js index eea0babf560..8a13aaf3fc9 100644 --- a/packages/rspack/tests/cssExtract/cases/split-chunks-recursiveIssuer/webpack.config.js +++ b/plugin-test/css-extract/cases/split-chunks-recursiveIssuer/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); function recursiveIssuer(m, c) { const issuer = c.moduleGraph.getIssuer(m); diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-single/a.css b/plugin-test/css-extract/cases/split-chunks-single/a.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-single/a.css rename to plugin-test/css-extract/cases/split-chunks-single/a.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-single/b.css b/plugin-test/css-extract/cases/split-chunks-single/b.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-single/b.css rename to plugin-test/css-extract/cases/split-chunks-single/b.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-single/c.css b/plugin-test/css-extract/cases/split-chunks-single/c.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-single/c.css rename to plugin-test/css-extract/cases/split-chunks-single/c.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-single/chunk1.js b/plugin-test/css-extract/cases/split-chunks-single/chunk1.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-single/chunk1.js rename to plugin-test/css-extract/cases/split-chunks-single/chunk1.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-single/chunk2.js b/plugin-test/css-extract/cases/split-chunks-single/chunk2.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-single/chunk2.js rename to plugin-test/css-extract/cases/split-chunks-single/chunk2.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-single/d.css b/plugin-test/css-extract/cases/split-chunks-single/d.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-single/d.css rename to plugin-test/css-extract/cases/split-chunks-single/d.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-single/e1.css b/plugin-test/css-extract/cases/split-chunks-single/e1.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-single/e1.css rename to plugin-test/css-extract/cases/split-chunks-single/e1.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-single/e2.css b/plugin-test/css-extract/cases/split-chunks-single/e2.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-single/e2.css rename to plugin-test/css-extract/cases/split-chunks-single/e2.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-single/entry1.js b/plugin-test/css-extract/cases/split-chunks-single/entry1.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-single/entry1.js rename to plugin-test/css-extract/cases/split-chunks-single/entry1.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-single/entry2.js b/plugin-test/css-extract/cases/split-chunks-single/entry2.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-single/entry2.js rename to plugin-test/css-extract/cases/split-chunks-single/entry2.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-single/expected/styles.css b/plugin-test/css-extract/cases/split-chunks-single/expected/styles.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-single/expected/styles.css rename to plugin-test/css-extract/cases/split-chunks-single/expected/styles.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-single/f.css b/plugin-test/css-extract/cases/split-chunks-single/f.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-single/f.css rename to plugin-test/css-extract/cases/split-chunks-single/f.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-single/g.css b/plugin-test/css-extract/cases/split-chunks-single/g.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-single/g.css rename to plugin-test/css-extract/cases/split-chunks-single/g.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-single/h.css b/plugin-test/css-extract/cases/split-chunks-single/h.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-single/h.css rename to plugin-test/css-extract/cases/split-chunks-single/h.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-single/style.css b/plugin-test/css-extract/cases/split-chunks-single/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks-single/style.css rename to plugin-test/css-extract/cases/split-chunks-single/style.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks-single/webpack.config.js b/plugin-test/css-extract/cases/split-chunks-single/webpack.config.js similarity index 88% rename from packages/rspack/tests/cssExtract/cases/split-chunks-single/webpack.config.js rename to plugin-test/css-extract/cases/split-chunks-single/webpack.config.js index acd44c346dd..2f88039b809 100644 --- a/packages/rspack/tests/cssExtract/cases/split-chunks-single/webpack.config.js +++ b/plugin-test/css-extract/cases/split-chunks-single/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: { diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks/expected/main.css b/plugin-test/css-extract/cases/split-chunks/expected/main.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks/expected/main.css rename to plugin-test/css-extract/cases/split-chunks/expected/main.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks/expected/vendors.css b/plugin-test/css-extract/cases/split-chunks/expected/vendors.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks/expected/vendors.css rename to plugin-test/css-extract/cases/split-chunks/expected/vendors.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks/index.js b/plugin-test/css-extract/cases/split-chunks/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks/index.js rename to plugin-test/css-extract/cases/split-chunks/index.js diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks/node_modules/bootstrap.css b/plugin-test/css-extract/cases/split-chunks/node_modules/bootstrap.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks/node_modules/bootstrap.css rename to plugin-test/css-extract/cases/split-chunks/node_modules/bootstrap.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks/style.css b/plugin-test/css-extract/cases/split-chunks/style.css similarity index 100% rename from packages/rspack/tests/cssExtract/cases/split-chunks/style.css rename to plugin-test/css-extract/cases/split-chunks/style.css diff --git a/packages/rspack/tests/cssExtract/cases/split-chunks/webpack.config.js b/plugin-test/css-extract/cases/split-chunks/webpack.config.js similarity index 87% rename from packages/rspack/tests/cssExtract/cases/split-chunks/webpack.config.js rename to plugin-test/css-extract/cases/split-chunks/webpack.config.js index d7f1579d156..5c249da1668 100644 --- a/packages/rspack/tests/cssExtract/cases/split-chunks/webpack.config.js +++ b/plugin-test/css-extract/cases/split-chunks/webpack.config.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../../../"); +const { CssExtractRspackPlugin } = require("@rspack/core"); module.exports = { entry: "./index.js", diff --git a/packages/rspack/tests/cssExtract/emitOption.test.js b/plugin-test/css-extract/emitOption.test.js similarity index 99% rename from packages/rspack/tests/cssExtract/emitOption.test.js rename to plugin-test/css-extract/emitOption.test.js index d9c6335167a..e836dad8103 100644 --- a/packages/rspack/tests/cssExtract/emitOption.test.js +++ b/plugin-test/css-extract/emitOption.test.js @@ -2,7 +2,7 @@ const fs = require("fs"); const path = require("path"); -const webpack = require("../../dist"); +const webpack = require("@rspack/core"); const { CssExtractRspackPlugin: MiniCssExtractPlugin } = webpack; const del = require("del"); diff --git a/packages/rspack/tests/cssExtract/enforceEsm.test.js b/plugin-test/css-extract/enforceEsm.test.js similarity index 100% rename from packages/rspack/tests/cssExtract/enforceEsm.test.js rename to plugin-test/css-extract/enforceEsm.test.js diff --git a/packages/rspack/tests/cssExtract/fixtures/attributes.js b/plugin-test/css-extract/fixtures/attributes.js similarity index 100% rename from packages/rspack/tests/cssExtract/fixtures/attributes.js rename to plugin-test/css-extract/fixtures/attributes.js diff --git a/packages/rspack/tests/cssExtract/fixtures/esm.js b/plugin-test/css-extract/fixtures/esm.js similarity index 100% rename from packages/rspack/tests/cssExtract/fixtures/esm.js rename to plugin-test/css-extract/fixtures/esm.js diff --git a/packages/rspack/tests/cssExtract/fixtures/insert.js b/plugin-test/css-extract/fixtures/insert.js similarity index 100% rename from packages/rspack/tests/cssExtract/fixtures/insert.js rename to plugin-test/css-extract/fixtures/insert.js diff --git a/packages/rspack/tests/cssExtract/fixtures/json/data-urls.json b/plugin-test/css-extract/fixtures/json/data-urls.json similarity index 100% rename from packages/rspack/tests/cssExtract/fixtures/json/data-urls.json rename to plugin-test/css-extract/fixtures/json/data-urls.json diff --git a/packages/rspack/tests/cssExtract/fixtures/locals.js b/plugin-test/css-extract/fixtures/locals.js similarity index 100% rename from packages/rspack/tests/cssExtract/fixtures/locals.js rename to plugin-test/css-extract/fixtures/locals.js diff --git a/packages/rspack/tests/cssExtract/fixtures/locals/index.css b/plugin-test/css-extract/fixtures/locals/index.css similarity index 100% rename from packages/rspack/tests/cssExtract/fixtures/locals/index.css rename to plugin-test/css-extract/fixtures/locals/index.css diff --git a/packages/rspack/tests/cssExtract/fixtures/locals/template.js b/plugin-test/css-extract/fixtures/locals/template.js similarity index 100% rename from packages/rspack/tests/cssExtract/fixtures/locals/template.js rename to plugin-test/css-extract/fixtures/locals/template.js diff --git a/packages/rspack/tests/cssExtract/fixtures/react.svg b/plugin-test/css-extract/fixtures/react.svg similarity index 100% rename from packages/rspack/tests/cssExtract/fixtures/react.svg rename to plugin-test/css-extract/fixtures/react.svg diff --git a/packages/rspack/tests/cssExtract/fixtures/simple.css b/plugin-test/css-extract/fixtures/simple.css similarity index 100% rename from packages/rspack/tests/cssExtract/fixtures/simple.css rename to plugin-test/css-extract/fixtures/simple.css diff --git a/packages/rspack/tests/cssExtract/fixtures/simple.js b/plugin-test/css-extract/fixtures/simple.js similarity index 100% rename from packages/rspack/tests/cssExtract/fixtures/simple.js rename to plugin-test/css-extract/fixtures/simple.js diff --git a/packages/rspack/tests/cssExtract/fixtures/style-url.css b/plugin-test/css-extract/fixtures/style-url.css similarity index 100% rename from packages/rspack/tests/cssExtract/fixtures/style-url.css rename to plugin-test/css-extract/fixtures/style-url.css diff --git a/packages/rspack/tests/cssExtract/fixtures/style-url.js b/plugin-test/css-extract/fixtures/style-url.js similarity index 100% rename from packages/rspack/tests/cssExtract/fixtures/style-url.js rename to plugin-test/css-extract/fixtures/style-url.js diff --git a/packages/rspack/tests/cssExtract/helpers/compile.js b/plugin-test/css-extract/helpers/compile.js similarity index 100% rename from packages/rspack/tests/cssExtract/helpers/compile.js rename to plugin-test/css-extract/helpers/compile.js diff --git a/packages/rspack/tests/cssExtract/helpers/getCompiler.js b/plugin-test/css-extract/helpers/getCompiler.js similarity index 95% rename from packages/rspack/tests/cssExtract/helpers/getCompiler.js rename to plugin-test/css-extract/helpers/getCompiler.js index 2f86257690a..6baa868a560 100644 --- a/packages/rspack/tests/cssExtract/helpers/getCompiler.js +++ b/plugin-test/css-extract/helpers/getCompiler.js @@ -1,7 +1,7 @@ const path = require("path"); -const { rspack: webpack } = require("../../../"); +const { rspack: webpack } = require("@rspack/core"); const { createFsFromVolume, Volume } = require("memfs"); -const { CssExtractRspackPlugin: MiniCssExtractPlugin } = require("../../../"); +const { CssExtractRspackPlugin: MiniCssExtractPlugin } = require("@rspack/core"); module.exports = (fixture, loaderOptions = {}, config = {}) => { const { outputFileSystem, ...cnfg } = config; diff --git a/packages/rspack/tests/cssExtract/helpers/getErrors.js b/plugin-test/css-extract/helpers/getErrors.js similarity index 100% rename from packages/rspack/tests/cssExtract/helpers/getErrors.js rename to plugin-test/css-extract/helpers/getErrors.js diff --git a/packages/rspack/tests/cssExtract/helpers/getWarnings.js b/plugin-test/css-extract/helpers/getWarnings.js similarity index 100% rename from packages/rspack/tests/cssExtract/helpers/getWarnings.js rename to plugin-test/css-extract/helpers/getWarnings.js diff --git a/packages/rspack/tests/cssExtract/helpers/index.js b/plugin-test/css-extract/helpers/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/helpers/index.js rename to plugin-test/css-extract/helpers/index.js diff --git a/packages/rspack/tests/cssExtract/helpers/normalizeErrors.js b/plugin-test/css-extract/helpers/normalizeErrors.js similarity index 100% rename from packages/rspack/tests/cssExtract/helpers/normalizeErrors.js rename to plugin-test/css-extract/helpers/normalizeErrors.js diff --git a/packages/rspack/tests/cssExtract/helpers/readAsset.js b/plugin-test/css-extract/helpers/readAsset.js similarity index 100% rename from packages/rspack/tests/cssExtract/helpers/readAsset.js rename to plugin-test/css-extract/helpers/readAsset.js diff --git a/packages/rspack/tests/cssExtract/helpers/runInJsDom.js b/plugin-test/css-extract/helpers/runInJsDom.js similarity index 100% rename from packages/rspack/tests/cssExtract/helpers/runInJsDom.js rename to plugin-test/css-extract/helpers/runInJsDom.js diff --git a/packages/rspack/tests/cssExtract/helpers/source.js b/plugin-test/css-extract/helpers/source.js similarity index 100% rename from packages/rspack/tests/cssExtract/helpers/source.js rename to plugin-test/css-extract/helpers/source.js diff --git a/packages/rspack/tests/cssExtract/helpers/yn.js b/plugin-test/css-extract/helpers/yn.js similarity index 100% rename from packages/rspack/tests/cssExtract/helpers/yn.js rename to plugin-test/css-extract/helpers/yn.js diff --git a/packages/rspack/tests/cssExtract/ignoreOrderOption.test.js b/plugin-test/css-extract/ignoreOrderOption.test.js similarity index 85% rename from packages/rspack/tests/cssExtract/ignoreOrderOption.test.js rename to plugin-test/css-extract/ignoreOrderOption.test.js index dcc0e7caa98..19e032abc48 100644 --- a/packages/rspack/tests/cssExtract/ignoreOrderOption.test.js +++ b/plugin-test/css-extract/ignoreOrderOption.test.js @@ -1,6 +1,6 @@ const path = require("path"); -const { rspack: webpack } = require("../../dist"); +const { rspack: webpack } = require("@rspack/core"); describe("IgnoreOrder", () => { it("should emit warnings", done => { @@ -13,6 +13,9 @@ describe("IgnoreOrder", () => { )); const compiler = webpack({ ...webpackConfig, + output: { + path: path.join(__dirname, "js", "ignoreOrderTest", "ignoreOrderFalse") + }, mode: "development", context: directoryForCase, cache: false, @@ -39,6 +42,9 @@ describe("IgnoreOrder", () => { )); const compiler = webpack({ ...webpackConfig, + output: { + path: path.join(__dirname, "js", "ignoreOrderTest", "ignoreOrder") + }, mode: "development", context: directoryForCase, cache: false, diff --git a/packages/rspack/tests/cssExtract/insertOption.test.js b/plugin-test/css-extract/insertOption.test.js similarity index 97% rename from packages/rspack/tests/cssExtract/insertOption.test.js rename to plugin-test/css-extract/insertOption.test.js index 660140e5900..5915e79b57b 100644 --- a/packages/rspack/tests/cssExtract/insertOption.test.js +++ b/plugin-test/css-extract/insertOption.test.js @@ -1,7 +1,7 @@ /* eslint-env browser */ const path = require("path"); -const { CssExtractRspackPlugin } = require("../../dist"); +const { CssExtractRspackPlugin } = require("@rspack/core"); const { compile, diff --git a/packages/rspack/tests/cssExtract/linkTagOption.test.js b/plugin-test/css-extract/linkTagOption.test.js similarity index 97% rename from packages/rspack/tests/cssExtract/linkTagOption.test.js rename to plugin-test/css-extract/linkTagOption.test.js index 893a31b9f52..e9f9d2817f1 100644 --- a/packages/rspack/tests/cssExtract/linkTagOption.test.js +++ b/plugin-test/css-extract/linkTagOption.test.js @@ -1,6 +1,6 @@ /* eslint-env browser */ const path = require("path"); -const { CssExtractRspackPlugin } = require("../../dist"); +const { CssExtractRspackPlugin } = require("@rspack/core"); const { compile, getCompiler, diff --git a/packages/rspack/tests/cssExtract/manual/README.md b/plugin-test/css-extract/manual/README.md similarity index 100% rename from packages/rspack/tests/cssExtract/manual/README.md rename to plugin-test/css-extract/manual/README.md diff --git a/packages/rspack/tests/cssExtract/manual/index.html b/plugin-test/css-extract/manual/index.html similarity index 100% rename from packages/rspack/tests/cssExtract/manual/index.html rename to plugin-test/css-extract/manual/index.html diff --git a/packages/rspack/tests/cssExtract/manual/src/crossorigin.css b/plugin-test/css-extract/manual/src/crossorigin.css similarity index 100% rename from packages/rspack/tests/cssExtract/manual/src/crossorigin.css rename to plugin-test/css-extract/manual/src/crossorigin.css diff --git a/packages/rspack/tests/cssExtract/manual/src/crossorigin.js b/plugin-test/css-extract/manual/src/crossorigin.js similarity index 100% rename from packages/rspack/tests/cssExtract/manual/src/crossorigin.js rename to plugin-test/css-extract/manual/src/crossorigin.js diff --git a/packages/rspack/tests/cssExtract/manual/src/index.js b/plugin-test/css-extract/manual/src/index.js similarity index 100% rename from packages/rspack/tests/cssExtract/manual/src/index.js rename to plugin-test/css-extract/manual/src/index.js diff --git a/packages/rspack/tests/cssExtract/manual/src/initial.css b/plugin-test/css-extract/manual/src/initial.css similarity index 100% rename from packages/rspack/tests/cssExtract/manual/src/initial.css rename to plugin-test/css-extract/manual/src/initial.css diff --git a/packages/rspack/tests/cssExtract/manual/src/lazy-failure.css b/plugin-test/css-extract/manual/src/lazy-failure.css similarity index 100% rename from packages/rspack/tests/cssExtract/manual/src/lazy-failure.css rename to plugin-test/css-extract/manual/src/lazy-failure.css diff --git a/packages/rspack/tests/cssExtract/manual/src/lazy-failure.js b/plugin-test/css-extract/manual/src/lazy-failure.js similarity index 100% rename from packages/rspack/tests/cssExtract/manual/src/lazy-failure.js rename to plugin-test/css-extract/manual/src/lazy-failure.js diff --git a/packages/rspack/tests/cssExtract/manual/src/lazy.css b/plugin-test/css-extract/manual/src/lazy.css similarity index 100% rename from packages/rspack/tests/cssExtract/manual/src/lazy.css rename to plugin-test/css-extract/manual/src/lazy.css diff --git a/packages/rspack/tests/cssExtract/manual/src/lazy.js b/plugin-test/css-extract/manual/src/lazy.js similarity index 100% rename from packages/rspack/tests/cssExtract/manual/src/lazy.js rename to plugin-test/css-extract/manual/src/lazy.js diff --git a/packages/rspack/tests/cssExtract/manual/src/lazy.module.css b/plugin-test/css-extract/manual/src/lazy.module.css similarity index 100% rename from packages/rspack/tests/cssExtract/manual/src/lazy.module.css rename to plugin-test/css-extract/manual/src/lazy.module.css diff --git a/packages/rspack/tests/cssExtract/manual/src/lazy2.css b/plugin-test/css-extract/manual/src/lazy2.css similarity index 100% rename from packages/rspack/tests/cssExtract/manual/src/lazy2.css rename to plugin-test/css-extract/manual/src/lazy2.css diff --git a/packages/rspack/tests/cssExtract/manual/src/preloaded1.css b/plugin-test/css-extract/manual/src/preloaded1.css similarity index 100% rename from packages/rspack/tests/cssExtract/manual/src/preloaded1.css rename to plugin-test/css-extract/manual/src/preloaded1.css diff --git a/packages/rspack/tests/cssExtract/manual/src/preloaded1.js b/plugin-test/css-extract/manual/src/preloaded1.js similarity index 100% rename from packages/rspack/tests/cssExtract/manual/src/preloaded1.js rename to plugin-test/css-extract/manual/src/preloaded1.js diff --git a/packages/rspack/tests/cssExtract/manual/src/preloaded2.css b/plugin-test/css-extract/manual/src/preloaded2.css similarity index 100% rename from packages/rspack/tests/cssExtract/manual/src/preloaded2.css rename to plugin-test/css-extract/manual/src/preloaded2.css diff --git a/packages/rspack/tests/cssExtract/manual/src/preloaded2.js b/plugin-test/css-extract/manual/src/preloaded2.js similarity index 100% rename from packages/rspack/tests/cssExtract/manual/src/preloaded2.js rename to plugin-test/css-extract/manual/src/preloaded2.js diff --git a/packages/rspack/tests/cssExtract/manual/src/simple.css b/plugin-test/css-extract/manual/src/simple.css similarity index 100% rename from packages/rspack/tests/cssExtract/manual/src/simple.css rename to plugin-test/css-extract/manual/src/simple.css diff --git a/packages/rspack/tests/cssExtract/manual/src/simple.module.css b/plugin-test/css-extract/manual/src/simple.module.css similarity index 100% rename from packages/rspack/tests/cssExtract/manual/src/simple.module.css rename to plugin-test/css-extract/manual/src/simple.module.css diff --git a/packages/rspack/tests/cssExtract/manual/src/worker.css b/plugin-test/css-extract/manual/src/worker.css similarity index 100% rename from packages/rspack/tests/cssExtract/manual/src/worker.css rename to plugin-test/css-extract/manual/src/worker.css diff --git a/packages/rspack/tests/cssExtract/manual/src/worker.js b/plugin-test/css-extract/manual/src/worker.js similarity index 100% rename from packages/rspack/tests/cssExtract/manual/src/worker.js rename to plugin-test/css-extract/manual/src/worker.js diff --git a/packages/rspack/tests/cssExtract/manual/webpack.config.js b/plugin-test/css-extract/manual/webpack.config.js similarity index 97% rename from packages/rspack/tests/cssExtract/manual/webpack.config.js rename to plugin-test/css-extract/manual/webpack.config.js index 832ef293300..4eda74c864f 100644 --- a/packages/rspack/tests/cssExtract/manual/webpack.config.js +++ b/plugin-test/css-extract/manual/webpack.config.js @@ -1,5 +1,5 @@ const yn = require("../helpers/yn"); -const Self = require("../../"); +const Self = require("@rspack/core"); const ENABLE_HMR = typeof process.env.ENABLE_HMR !== "undefined" diff --git a/packages/rspack/tests/cssExtract/normalizeUrl.test.js b/plugin-test/css-extract/normalizeUrl.test.js similarity index 74% rename from packages/rspack/tests/cssExtract/normalizeUrl.test.js rename to plugin-test/css-extract/normalizeUrl.test.js index 1fbfc79c747..2001ac97113 100644 --- a/packages/rspack/tests/cssExtract/normalizeUrl.test.js +++ b/plugin-test/css-extract/normalizeUrl.test.js @@ -1,4 +1,4 @@ -const normalizeUrl = require("../../dist/builtin-plugin/css-extract/hmr/normalize-url"); +const normalizeUrl = require("../../packages/rspack/dist/builtin-plugin/css-extract/hmr/normalize-url"); const dataUrls = require("./fixtures/json/data-urls.json"); describe("normalize-url", () => { diff --git a/packages/rspack/tests/cssExtract/runtimeOption.test.js b/plugin-test/css-extract/runtimeOption.test.js similarity index 97% rename from packages/rspack/tests/cssExtract/runtimeOption.test.js rename to plugin-test/css-extract/runtimeOption.test.js index c41ae5baa29..23a652cd00a 100644 --- a/packages/rspack/tests/cssExtract/runtimeOption.test.js +++ b/plugin-test/css-extract/runtimeOption.test.js @@ -1,6 +1,6 @@ /* eslint-env browser */ const path = require("path"); -const { CssExtractRspackPlugin } = require("../../dist"); +const { CssExtractRspackPlugin } = require("@rspack/core"); const { compile, getCompiler, diff --git a/packages/rspack/tests/cssExtract/stringifyLocal.test.js b/plugin-test/css-extract/stringifyLocal.test.js similarity index 87% rename from packages/rspack/tests/cssExtract/stringifyLocal.test.js rename to plugin-test/css-extract/stringifyLocal.test.js index 4a858d50ad0..eaaf549f844 100644 --- a/packages/rspack/tests/cssExtract/stringifyLocal.test.js +++ b/plugin-test/css-extract/stringifyLocal.test.js @@ -1,6 +1,6 @@ const { stringifyLocal -} = require("../../dist/builtin-plugin/css-extract/utils"); +} = require("../../packages/rspack/dist/builtin-plugin/css-extract/utils"); describe("stringifyLocal", () => { it(`primitive`, async () => { diff --git a/packages/rspack/tests/cssExtract/validate-loader-options.test.js b/plugin-test/css-extract/validate-loader-options.test.js similarity index 100% rename from packages/rspack/tests/cssExtract/validate-loader-options.test.js rename to plugin-test/css-extract/validate-loader-options.test.js diff --git a/packages/rspack/tests/cssExtract/validate-plugin-options.test.js b/plugin-test/css-extract/validate-plugin-options.test.js similarity index 61% rename from packages/rspack/tests/cssExtract/validate-plugin-options.test.js rename to plugin-test/css-extract/validate-plugin-options.test.js index 1f28b49efaa..e8e1a445d2e 100644 --- a/packages/rspack/tests/cssExtract/validate-plugin-options.test.js +++ b/plugin-test/css-extract/validate-plugin-options.test.js @@ -1,4 +1,4 @@ -const { CssExtractRspackPlugin } = require("../../dist"); +const { CssExtractRspackPlugin } = require("@rspack/core"); describe.skip("validate options", () => { const tests = { @@ -18,7 +18,7 @@ describe.skip("validate options", () => { failure: [1] }, insert: { - success: ["#existing-style", function insert() {}], + success: ["#existing-style", function insert() { }], failure: [1, true, {}] }, attributes: { @@ -47,30 +47,29 @@ describe.skip("validate options", () => { } async function createTestCase(key, value, type) { - it(`should ${ - type === "success" ? "successfully validate" : "throw an error on" - } the "${key}" option with "${stringifyValue(value)}" value`, async () => { - let error; + it(`should ${type === "success" ? "successfully validate" : "throw an error on" + } the "${key}" option with "${stringifyValue(value)}" value`, async () => { + let error; - try { - // eslint-disable-next-line no-new - new CssExtractRspackPlugin({ [key]: value }); - } catch (errorFromPlugin) { - if (errorFromPlugin.name !== "ValidationError") { - throw errorFromPlugin; - } + try { + // eslint-disable-next-line no-new + new CssExtractRspackPlugin({ [key]: value }); + } catch (errorFromPlugin) { + if (errorFromPlugin.name !== "ValidationError") { + throw errorFromPlugin; + } - error = errorFromPlugin; - } finally { - if (type === "success") { - expect(error).toBeUndefined(); - } else if (type === "failure") { - expect(() => { - throw error; - }).toThrowErrorMatchingSnapshot(); + error = errorFromPlugin; + } finally { + if (type === "success") { + expect(error).toBeUndefined(); + } else if (type === "failure") { + expect(() => { + throw error; + }).toThrowErrorMatchingSnapshot(); + } } - } - }); + }); } for (const [key, values] of Object.entries(tests)) { diff --git a/plugin-test/jest.config.js b/plugin-test/jest.config.js new file mode 100644 index 00000000000..25d345e1b32 --- /dev/null +++ b/plugin-test/jest.config.js @@ -0,0 +1,27 @@ +const path = require("path"); + + +const root = path.resolve(__dirname, "../"); + +/** @type {import('jest').Config} */ +const config = { + testEnvironment: "../scripts/test/patch-node-env.cjs", + testMatch: [ + "/**/*.test.js" + ], + testTimeout: process.env.CI ? 60000 : 30000, + prettierPath: require.resolve("prettier-2"), + cache: false, + transformIgnorePatterns: [root], + setupFilesAfterEnv: ["/setupTestEnv.js"], + snapshotFormat: { + escapeString: true, + printBasicPrototype: true + }, + globals: { + updateSnapshot: + process.argv.includes("-u") || process.argv.includes("--updateSnapshot") + }, +}; + +module.exports = config; diff --git a/plugin-test/package.json b/plugin-test/package.json new file mode 100644 index 00000000000..ba71c5b320d --- /dev/null +++ b/plugin-test/package.json @@ -0,0 +1,19 @@ +{ + "name": "plugin-test", + "private": true, + "version": "0.1.0", + "license": "MIT", + "main": "./dist/index.d.ts", + "scripts": { + "test": "cross-env NO_COLOR=1 node --expose-gc --max-old-space-size=8192 --experimental-vm-modules ../node_modules/jest-cli/bin/jest --logHeapUsage" + }, + "repository": "web-infra-dev/rspack", + "devDependencies": { + "@rspack/core": "workspace:*", + "@rspack/plugin-minify": "workspace:^", + "jsdom": "^24.0.0", + "del": "^6.0.0", + "memfs": "4.7.7" + }, + "dependencies": {} +} \ No newline at end of file diff --git a/plugin-test/setupTestEnv.js b/plugin-test/setupTestEnv.js new file mode 100644 index 00000000000..56bdf554885 --- /dev/null +++ b/plugin-test/setupTestEnv.js @@ -0,0 +1 @@ +jest.setTimeout(10000); \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 97aeeced8a5..49bb7d3ffb7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -800,6 +800,24 @@ importers: specifier: 0.14.0 version: 0.14.0 + plugin-test: + devDependencies: + '@rspack/core': + specifier: workspace:* + version: link:../packages/rspack + '@rspack/plugin-minify': + specifier: workspace:^ + version: link:../packages/rspack-plugin-minify + del: + specifier: ^6.0.0 + version: 6.1.1 + jsdom: + specifier: ^24.0.0 + version: 24.0.0 + memfs: + specifier: 4.7.7 + version: 4.7.7 + scripts: devDependencies: '@actions/core': @@ -11949,7 +11967,6 @@ packages: engines: {node: '>= 4.0.0'} dependencies: tslib: 2.6.2 - dev: false /memfs@4.8.1: resolution: {integrity: sha512-7q/AdPzf2WpwPlPL4v1kE2KsJsHl7EF4+hAeVzlyanr2+YnR21NVn9mDqo+7DEaKDRsQy8nvxPlKH4WqMtiO0w==} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index aa94ed9befe..d63fe3cb4fa 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -11,5 +11,6 @@ packages: - "webpack-examples" - "benchcases/react-refresh" - "webpack-test" + - "plugin-test" - "webpack-cli-test" - "diffcases/*"