shakapacker 8.4.0 → 9.0.0.beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/STATUS.md +1 -0
- data/.github/workflows/claude-code-review.yml +54 -0
- data/.github/workflows/claude.yml +50 -0
- data/.github/workflows/dummy.yml +1 -1
- data/.github/workflows/generator.yml +4 -14
- data/.github/workflows/node.yml +1 -1
- data/.rubocop.yml +1 -0
- data/CHANGELOG.md +8 -2
- data/Gemfile.lock +3 -3
- data/README.md +2 -2
- data/Rakefile +18 -1
- data/docs/css-modules-export-mode.md +288 -0
- data/docs/peer-dependencies.md +40 -0
- data/docs/rspack.md +190 -0
- data/docs/rspack_migration_guide.md +202 -0
- data/docs/troubleshooting.md +5 -0
- data/docs/using_esbuild_loader.md +3 -3
- data/docs/using_swc_loader.md +5 -3
- data/lib/install/bin/shakapacker +3 -5
- data/lib/install/config/rspack/rspack.config.js +6 -0
- data/lib/install/config/shakapacker.yml +6 -2
- data/lib/install/package.json +30 -0
- data/lib/install/template.rb +12 -2
- data/lib/shakapacker/configuration.rb +45 -0
- data/lib/shakapacker/dev_server_runner.rb +25 -5
- data/lib/shakapacker/manifest.rb +4 -2
- data/lib/shakapacker/rspack_runner.rb +19 -0
- data/lib/shakapacker/runner.rb +144 -4
- data/lib/shakapacker/utils/manager.rb +2 -0
- data/lib/shakapacker/version.rb +1 -1
- data/lib/shakapacker/version_checker.rb +1 -1
- data/lib/shakapacker/webpack_runner.rb +4 -42
- data/lib/tasks/shakapacker/install.rake +6 -2
- data/package/config.js +24 -0
- data/package/environments/base.js +20 -65
- data/package/environments/development.js +60 -5
- data/package/environments/production.js +29 -51
- data/package/environments/test.js +17 -1
- data/package/index.d.ts +62 -20
- data/package/index.js +4 -2
- data/package/optimization/rspack.js +29 -0
- data/package/optimization/webpack.js +49 -0
- data/package/plugins/rspack.js +88 -0
- data/package/plugins/webpack.js +62 -0
- data/package/rspack/index.js +57 -0
- data/package/rules/babel.js +2 -2
- data/package/rules/css.js +1 -1
- data/package/rules/esbuild.js +2 -2
- data/package/rules/file.js +11 -5
- data/package/rules/less.js +1 -1
- data/package/rules/raw.js +12 -2
- data/package/rules/rspack.js +162 -0
- data/package/rules/sass.js +6 -2
- data/package/rules/stylus.js +1 -1
- data/package/rules/swc.js +2 -2
- data/package/utils/debug.js +49 -0
- data/package/utils/getStyleRule.js +16 -3
- data/package/utils/requireOrError.js +15 -0
- data/package/utils/validateDependencies.js +61 -0
- data/package/webpackDevServerConfig.js +2 -0
- data/package.json +19 -31
- data/test/package/environments/base.test.js +1 -1
- data/test/package/rules/esbuild.test.js +1 -1
- data/test/package/rules/swc.test.js +1 -1
- data/test/package/rules/{index.test.js → webpack.test.js} +1 -1
- data/yarn.lock +2136 -726
- metadata +26 -11
- /data/package/rules/{index.js → webpack.js} +0 -0
@@ -0,0 +1,162 @@
|
|
1
|
+
/* eslint global-require: 0 */
|
2
|
+
|
3
|
+
const { moduleExists } = require("../utils/helpers")
|
4
|
+
const { debug, info, warn } = require("../utils/debug")
|
5
|
+
|
6
|
+
debug("Loading Rspack rules configuration...")
|
7
|
+
|
8
|
+
const rules = []
|
9
|
+
|
10
|
+
// Use Rspack's built-in SWC loader for JavaScript files
|
11
|
+
debug("Adding JavaScript rule with builtin:swc-loader")
|
12
|
+
rules.push({
|
13
|
+
test: /\.(js|jsx|mjs)$/,
|
14
|
+
exclude: /node_modules/,
|
15
|
+
type: "javascript/auto",
|
16
|
+
use: [
|
17
|
+
{
|
18
|
+
loader: "builtin:swc-loader",
|
19
|
+
options: {
|
20
|
+
jsc: {
|
21
|
+
parser: {
|
22
|
+
syntax: "ecmascript",
|
23
|
+
jsx: true
|
24
|
+
},
|
25
|
+
transform: {
|
26
|
+
react: {
|
27
|
+
runtime: "automatic"
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
]
|
34
|
+
})
|
35
|
+
|
36
|
+
// Use Rspack's built-in SWC loader for TypeScript files
|
37
|
+
debug("Adding TypeScript rule with builtin:swc-loader")
|
38
|
+
rules.push({
|
39
|
+
test: /\.(ts|tsx)$/,
|
40
|
+
exclude: /node_modules/,
|
41
|
+
type: "javascript/auto",
|
42
|
+
use: [
|
43
|
+
{
|
44
|
+
loader: "builtin:swc-loader",
|
45
|
+
options: {
|
46
|
+
jsc: {
|
47
|
+
parser: {
|
48
|
+
syntax: "typescript",
|
49
|
+
tsx: true
|
50
|
+
},
|
51
|
+
transform: {
|
52
|
+
react: {
|
53
|
+
runtime: "automatic"
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
]
|
60
|
+
})
|
61
|
+
|
62
|
+
// CSS rules using Rspack's built-in CSS handling
|
63
|
+
debug("Checking for CSS loader...")
|
64
|
+
if (moduleExists("css-loader")) {
|
65
|
+
debug("css-loader found, loading CSS rule configuration...")
|
66
|
+
const css = require("./css")
|
67
|
+
if (css) {
|
68
|
+
debug("Successfully added CSS rule")
|
69
|
+
rules.push(css)
|
70
|
+
} else {
|
71
|
+
warn("css-loader found but rule configuration returned null")
|
72
|
+
}
|
73
|
+
} else {
|
74
|
+
info("Skipping CSS support - css-loader not installed")
|
75
|
+
}
|
76
|
+
|
77
|
+
// Sass rules
|
78
|
+
debug("Checking for Sass loader...")
|
79
|
+
if (moduleExists("sass") && moduleExists("sass-loader")) {
|
80
|
+
debug("sass and sass-loader found, loading Sass rule configuration...")
|
81
|
+
const sass = require("./sass")
|
82
|
+
if (sass) {
|
83
|
+
debug("Successfully added Sass rule")
|
84
|
+
rules.push(sass)
|
85
|
+
} else {
|
86
|
+
warn("sass and sass-loader found but rule configuration returned null")
|
87
|
+
}
|
88
|
+
} else if (!moduleExists("sass")) {
|
89
|
+
info("Skipping Sass support - sass not installed")
|
90
|
+
} else if (!moduleExists("sass-loader")) {
|
91
|
+
info("Skipping Sass support - sass-loader not installed")
|
92
|
+
}
|
93
|
+
|
94
|
+
// Less rules
|
95
|
+
debug("Checking for Less loader...")
|
96
|
+
if (moduleExists("less") && moduleExists("less-loader")) {
|
97
|
+
debug("less and less-loader found, loading Less rule configuration...")
|
98
|
+
const less = require("./less")
|
99
|
+
if (less) {
|
100
|
+
debug("Successfully added Less rule")
|
101
|
+
rules.push(less)
|
102
|
+
} else {
|
103
|
+
warn("less and less-loader found but rule configuration returned null")
|
104
|
+
}
|
105
|
+
} else if (!moduleExists("less")) {
|
106
|
+
info("Skipping Less support - less not installed")
|
107
|
+
} else if (!moduleExists("less-loader")) {
|
108
|
+
info("Skipping Less support - less-loader not installed")
|
109
|
+
}
|
110
|
+
|
111
|
+
// Stylus rules
|
112
|
+
debug("Checking for Stylus loader...")
|
113
|
+
if (moduleExists("stylus") && moduleExists("stylus-loader")) {
|
114
|
+
debug("stylus and stylus-loader found, loading Stylus rule configuration...")
|
115
|
+
const stylus = require("./stylus")
|
116
|
+
if (stylus) {
|
117
|
+
debug("Successfully added Stylus rule")
|
118
|
+
rules.push(stylus)
|
119
|
+
} else {
|
120
|
+
warn("stylus and stylus-loader found but rule configuration returned null")
|
121
|
+
}
|
122
|
+
} else if (!moduleExists("stylus")) {
|
123
|
+
info("Skipping Stylus support - stylus not installed")
|
124
|
+
} else if (!moduleExists("stylus-loader")) {
|
125
|
+
info("Skipping Stylus support - stylus-loader not installed")
|
126
|
+
}
|
127
|
+
|
128
|
+
// ERB template support
|
129
|
+
debug("Checking for ERB template support...")
|
130
|
+
const erb = require("./erb")
|
131
|
+
|
132
|
+
if (erb) {
|
133
|
+
debug("Successfully added ERB rule")
|
134
|
+
rules.push(erb)
|
135
|
+
} else {
|
136
|
+
info("Skipping ERB support - rails-erb-loader not installed")
|
137
|
+
}
|
138
|
+
|
139
|
+
// File/asset handling using Rspack's built-in asset modules
|
140
|
+
debug("Adding file/asset handling rule...")
|
141
|
+
const file = require("./file")
|
142
|
+
|
143
|
+
if (file) {
|
144
|
+
debug("Successfully added file/asset rule")
|
145
|
+
rules.push(file)
|
146
|
+
} else {
|
147
|
+
warn("file rule configuration returned null")
|
148
|
+
}
|
149
|
+
|
150
|
+
// Raw file loading
|
151
|
+
debug("Adding raw file loading rule...")
|
152
|
+
const raw = require("./raw")
|
153
|
+
|
154
|
+
if (raw) {
|
155
|
+
debug("Successfully added raw file rule")
|
156
|
+
rules.push(raw)
|
157
|
+
} else {
|
158
|
+
warn("raw rule configuration returned null")
|
159
|
+
}
|
160
|
+
|
161
|
+
debug(`Rspack rules configuration complete. Total rules: ${rules.length}`)
|
162
|
+
module.exports = rules
|
data/package/rules/sass.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* eslint global-require: 0 */
|
2
2
|
|
3
|
-
const getStyleRule = require("../utils/getStyleRule")
|
3
|
+
const { getStyleRule } = require("../utils/getStyleRule")
|
4
4
|
const { canProcess, packageMajorVersion } = require("../utils/helpers")
|
5
5
|
const { additional_paths: extraPaths } = require("../config")
|
6
6
|
|
@@ -11,7 +11,11 @@ module.exports = canProcess("sass-loader", (resolvedPath) => {
|
|
11
11
|
{
|
12
12
|
loader: resolvedPath,
|
13
13
|
options: {
|
14
|
-
|
14
|
+
sourceMap: true,
|
15
|
+
sassOptions: {
|
16
|
+
[optionKey]: extraPaths,
|
17
|
+
quietDeps: true
|
18
|
+
}
|
15
19
|
}
|
16
20
|
}
|
17
21
|
])
|
data/package/rules/stylus.js
CHANGED
data/package/rules/swc.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
const { loaderMatches } = require("../utils/helpers")
|
2
2
|
const { getSwcLoaderConfig } = require("../swc")
|
3
|
-
const {
|
3
|
+
const { javascript_transpiler: javascriptTranspiler } = require("../config")
|
4
4
|
const jscommon = require("./jscommon")
|
5
5
|
|
6
|
-
module.exports = loaderMatches(
|
6
|
+
module.exports = loaderMatches(javascriptTranspiler, "swc", () => ({
|
7
7
|
test: /\.(ts|tsx|js|jsx|mjs|coffee)?(\.erb)?$/,
|
8
8
|
...jscommon,
|
9
9
|
use: ({ resource }) => getSwcLoaderConfig(resource)
|
@@ -0,0 +1,49 @@
|
|
1
|
+
/**
|
2
|
+
* Debug utility for Shakapacker
|
3
|
+
* Provides conditional logging based on environment variables
|
4
|
+
*/
|
5
|
+
|
6
|
+
const isDebugMode = () => {
|
7
|
+
// Explicitly check for debug mode being disabled
|
8
|
+
if (process.env.SHAKAPACKER_DEBUG === "false") {
|
9
|
+
return false
|
10
|
+
}
|
11
|
+
|
12
|
+
// Support both SHAKAPACKER_DEBUG (new) and DEBUG_SHAKAPACKER (legacy) for backwards compatibility
|
13
|
+
return (
|
14
|
+
process.env.SHAKAPACKER_DEBUG === "true" ||
|
15
|
+
process.env.DEBUG_SHAKAPACKER === "true"
|
16
|
+
)
|
17
|
+
}
|
18
|
+
|
19
|
+
const debug = (message, ...args) => {
|
20
|
+
if (isDebugMode()) {
|
21
|
+
// eslint-disable-next-line no-console
|
22
|
+
console.log(`[Shakapacker] ${message}`, ...args)
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
const warn = (message, ...args) => {
|
27
|
+
// eslint-disable-next-line no-console
|
28
|
+
console.warn(`[Shakapacker] WARNING: ${message}`, ...args)
|
29
|
+
}
|
30
|
+
|
31
|
+
const error = (message, ...args) => {
|
32
|
+
// eslint-disable-next-line no-console
|
33
|
+
console.error(`[Shakapacker] ERROR: ${message}`, ...args)
|
34
|
+
}
|
35
|
+
|
36
|
+
const info = (message, ...args) => {
|
37
|
+
if (isDebugMode()) {
|
38
|
+
// eslint-disable-next-line no-console
|
39
|
+
console.info(`[Shakapacker] INFO: ${message}`, ...args)
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
module.exports = {
|
44
|
+
debug,
|
45
|
+
warn,
|
46
|
+
error,
|
47
|
+
info,
|
48
|
+
isDebugMode
|
49
|
+
}
|
@@ -1,5 +1,7 @@
|
|
1
1
|
/* eslint global-require: 0 */
|
2
2
|
const { canProcess, moduleExists } = require("./helpers")
|
3
|
+
const { requireOrError } = require("./requireOrError")
|
4
|
+
const config = require("../config")
|
3
5
|
const inliningCss = require("./inliningCss")
|
4
6
|
|
5
7
|
const getStyleRule = (test, preprocessors = []) => {
|
@@ -12,8 +14,13 @@ const getStyleRule = (test, preprocessors = []) => {
|
|
12
14
|
|
13
15
|
// style-loader is required when using css modules with HMR on the webpack-dev-server
|
14
16
|
|
17
|
+
const extractionPlugin =
|
18
|
+
config.assets_bundler === "rspack"
|
19
|
+
? requireOrError("@rspack/core").CssExtractRspackPlugin.loader
|
20
|
+
: requireOrError("mini-css-extract-plugin").loader
|
21
|
+
|
15
22
|
const use = [
|
16
|
-
inliningCss ? "style-loader" :
|
23
|
+
inliningCss ? "style-loader" : extractionPlugin,
|
17
24
|
{
|
18
25
|
loader: require.resolve("css-loader"),
|
19
26
|
options: {
|
@@ -28,13 +35,19 @@ const getStyleRule = (test, preprocessors = []) => {
|
|
28
35
|
...preprocessors
|
29
36
|
].filter(Boolean)
|
30
37
|
|
31
|
-
|
38
|
+
const result = {
|
32
39
|
test,
|
33
40
|
use
|
34
41
|
}
|
42
|
+
|
43
|
+
if (config.assets_bundler === "rspack") {
|
44
|
+
result.type = "javascript/auto"
|
45
|
+
}
|
46
|
+
|
47
|
+
return result
|
35
48
|
}
|
36
49
|
|
37
50
|
return null
|
38
51
|
}
|
39
52
|
|
40
|
-
module.exports = getStyleRule
|
53
|
+
module.exports = { getStyleRule }
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/* eslint global-require: 0 */
|
2
|
+
/* eslint import/no-dynamic-require: 0 */
|
3
|
+
const config = require("../config")
|
4
|
+
|
5
|
+
const requireOrError = (moduleName) => {
|
6
|
+
try {
|
7
|
+
return require(moduleName)
|
8
|
+
} catch (error) {
|
9
|
+
throw new Error(
|
10
|
+
`[SHAKAPACKER]: ${moduleName} is required for ${config.assets_bundler} but is not installed. View Shakapacker's documented dependencies at https://github.com/shakacode/shakapacker/tree/main/docs/peer-dependencies.md`
|
11
|
+
)
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
module.exports = { requireOrError }
|
@@ -0,0 +1,61 @@
|
|
1
|
+
/**
|
2
|
+
* Validates that required dependencies are installed for the selected bundler
|
3
|
+
*/
|
4
|
+
|
5
|
+
const { moduleExists } = require("./helpers")
|
6
|
+
const { error } = require("./debug")
|
7
|
+
|
8
|
+
const validateRspackDependencies = () => {
|
9
|
+
const requiredDependencies = ["@rspack/core", "rspack-manifest-plugin"]
|
10
|
+
|
11
|
+
const missingDependencies = requiredDependencies.filter(
|
12
|
+
(dep) => !moduleExists(dep)
|
13
|
+
)
|
14
|
+
|
15
|
+
if (missingDependencies.length > 0) {
|
16
|
+
error(
|
17
|
+
`Missing required dependencies for RSpack:\n${missingDependencies
|
18
|
+
.map((dep) => ` - ${dep}`)
|
19
|
+
.join(
|
20
|
+
"\n"
|
21
|
+
)}\n\nPlease install them with:\n npm install ${missingDependencies.join(
|
22
|
+
" "
|
23
|
+
)}`
|
24
|
+
)
|
25
|
+
throw new Error(
|
26
|
+
`Missing RSpack dependencies: ${missingDependencies.join(", ")}`
|
27
|
+
)
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
const validateWebpackDependencies = () => {
|
32
|
+
const requiredDependencies = [
|
33
|
+
"webpack",
|
34
|
+
"webpack-cli",
|
35
|
+
"webpack-assets-manifest"
|
36
|
+
]
|
37
|
+
|
38
|
+
const missingDependencies = requiredDependencies.filter(
|
39
|
+
(dep) => !moduleExists(dep)
|
40
|
+
)
|
41
|
+
|
42
|
+
if (missingDependencies.length > 0) {
|
43
|
+
error(
|
44
|
+
`Missing required dependencies for Webpack:\n${missingDependencies
|
45
|
+
.map((dep) => ` - ${dep}`)
|
46
|
+
.join(
|
47
|
+
"\n"
|
48
|
+
)}\n\nPlease install them with:\n npm install ${missingDependencies.join(
|
49
|
+
" "
|
50
|
+
)}`
|
51
|
+
)
|
52
|
+
throw new Error(
|
53
|
+
`Missing Webpack dependencies: ${missingDependencies.join(", ")}`
|
54
|
+
)
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
module.exports = {
|
59
|
+
validateRspackDependencies,
|
60
|
+
validateWebpackDependencies
|
61
|
+
}
|
@@ -39,6 +39,7 @@ function createDevServerConfig() {
|
|
39
39
|
devMiddleware: {
|
40
40
|
publicPath
|
41
41
|
},
|
42
|
+
hot: devServerYamlConfig.hmr,
|
42
43
|
liveReload,
|
43
44
|
historyApiFallback: {
|
44
45
|
disableDotRule: true
|
@@ -47,6 +48,7 @@ function createDevServerConfig() {
|
|
47
48
|
publicPath: contentBase
|
48
49
|
}
|
49
50
|
}
|
51
|
+
delete devServerYamlConfig.hmr
|
50
52
|
|
51
53
|
if (devServerYamlConfig.static) {
|
52
54
|
config.static = { ...config.static, ...devServerYamlConfig.static }
|
data/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "shakapacker",
|
3
|
-
"version": "
|
3
|
+
"version": "9.0.0-beta.2",
|
4
4
|
"description": "Use webpack to manage app-like JavaScript modules in Rails",
|
5
5
|
"homepage": "https://github.com/shakacode/shakapacker",
|
6
6
|
"bugs": {
|
@@ -14,6 +14,16 @@
|
|
14
14
|
"author": "David Heinemeier Hansson <david@basecamp.com>, Justin Gordon <justin@shakacode.com>",
|
15
15
|
"main": "package/index.js",
|
16
16
|
"types": "package/index.d.ts",
|
17
|
+
"exports": {
|
18
|
+
".": "./package/index.js",
|
19
|
+
"./webpack": "./package/webpack/index.js",
|
20
|
+
"./rspack": "./package/rspack/index.js",
|
21
|
+
"./swc": "./package/swc/index.js",
|
22
|
+
"./esbuild": "./package/esbuild/index.js",
|
23
|
+
"./package.json": "./package.json",
|
24
|
+
"./package/babel/preset.js": "./package/babel/preset.js",
|
25
|
+
"./package/*": "./package/*"
|
26
|
+
},
|
17
27
|
"files": [
|
18
28
|
"package",
|
19
29
|
"lib/install/config/shakapacker.yml"
|
@@ -27,8 +37,11 @@
|
|
27
37
|
"path-complete-extname": "^1.0.0"
|
28
38
|
},
|
29
39
|
"devDependencies": {
|
40
|
+
"@rspack/cli": "^1.4.11",
|
41
|
+
"@rspack/core": "^1.4.11",
|
30
42
|
"babel-loader": "^8.2.4",
|
31
43
|
"compression-webpack-plugin": "^9.0.0",
|
44
|
+
"css-loader": "^7.1.2",
|
32
45
|
"esbuild-loader": "^2.18.0",
|
33
46
|
"eslint": "^8.0.0",
|
34
47
|
"eslint-config-airbnb": "^19.0.0",
|
@@ -41,41 +54,16 @@
|
|
41
54
|
"eslint-plugin-react-hooks": "^4.6.0",
|
42
55
|
"jest": "^29.7.0",
|
43
56
|
"memory-fs": "^0.5.0",
|
57
|
+
"mini-css-extract-plugin": "^2.9.4",
|
44
58
|
"prettier": "^3.2.5",
|
59
|
+
"rspack-manifest-plugin": "^5.0.3",
|
60
|
+
"sass-loader": "^16.0.5",
|
45
61
|
"swc-loader": "^0.1.15",
|
46
62
|
"thenify": "^3.3.1",
|
47
63
|
"webpack": "5.93.0",
|
48
64
|
"webpack-assets-manifest": "^5.0.6",
|
49
|
-
"webpack-
|
50
|
-
"webpack-
|
51
|
-
},
|
52
|
-
"peerDependencies": {
|
53
|
-
"@babel/core": "^7.17.9",
|
54
|
-
"@babel/plugin-transform-runtime": "^7.17.0",
|
55
|
-
"@babel/preset-env": "^7.16.11",
|
56
|
-
"@babel/runtime": "^7.17.9",
|
57
|
-
"@types/babel__core": "^7.0.0",
|
58
|
-
"@types/webpack": "^5.0.0",
|
59
|
-
"babel-loader": "^8.2.4 || ^9.0.0 || ^10.0.0",
|
60
|
-
"compression-webpack-plugin": "^9.0.0 || ^10.0.0|| ^11.0.0",
|
61
|
-
"terser-webpack-plugin": "^5.3.1",
|
62
|
-
"webpack": "^5.76.0",
|
63
|
-
"webpack-assets-manifest": "^5.0.6 || ^6.0.0",
|
64
|
-
"webpack-subresource-integrity": "^5.1.0",
|
65
|
-
"webpack-cli": "^4.9.2 || ^5.0.0 || ^6.0.0",
|
66
|
-
"webpack-dev-server": "^4.15.2 || ^5.2.2",
|
67
|
-
"webpack-merge": "^5.8.0 || ^6.0.0"
|
68
|
-
},
|
69
|
-
"peerDependenciesMeta": {
|
70
|
-
"@types/babel__core": {
|
71
|
-
"optional": true
|
72
|
-
},
|
73
|
-
"@types/webpack": {
|
74
|
-
"optional": true
|
75
|
-
},
|
76
|
-
"webpack-subresource-integrity": {
|
77
|
-
"optional": true
|
78
|
-
}
|
65
|
+
"webpack-merge": "^5.8.0",
|
66
|
+
"webpack-subresource-integrity": "^5.1.0"
|
79
67
|
},
|
80
68
|
"packageManager": "yarn@1.22.22",
|
81
69
|
"engines": {
|
@@ -79,7 +79,7 @@ describe("Base config", () => {
|
|
79
79
|
})
|
80
80
|
|
81
81
|
test("should return default loader rules for each file in config/loaders", () => {
|
82
|
-
const rules = require("../../../package/rules")
|
82
|
+
const rules = require("../../../package/rules/webpack")
|
83
83
|
|
84
84
|
const defaultRules = Object.keys(rules)
|
85
85
|
const configRules = baseConfig.module.rules
|
@@ -11,7 +11,7 @@ jest.mock("../../../package/config", () => {
|
|
11
11
|
const original = jest.requireActual("../../../package/config")
|
12
12
|
return {
|
13
13
|
...original,
|
14
|
-
|
14
|
+
javascript_transpiler: "esbuild",
|
15
15
|
additional_paths: [...original.additional_paths, "node_modules/included"]
|
16
16
|
}
|
17
17
|
})
|
@@ -11,7 +11,7 @@ jest.mock("../../../package/config", () => {
|
|
11
11
|
const original = jest.requireActual("../../../package/config")
|
12
12
|
return {
|
13
13
|
...original,
|
14
|
-
|
14
|
+
javascript_transpiler: "swc",
|
15
15
|
additional_paths: [...original.additional_paths, "node_modules/included"]
|
16
16
|
}
|
17
17
|
})
|