@nuxt/webpack-builder 3.0.0-rc.1 → 3.0.0-rc.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.
- package/dist/index.mjs +4 -5
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -60,14 +60,12 @@ const DynamicBasePlugin = createUnplugin(function(options = {}) {
|
|
|
60
60
|
s.replace(/const base = ['"]\/__NUXT_BASE__\/['"]/, "const base = buildAssetsDir()");
|
|
61
61
|
}
|
|
62
62
|
s.replace(/from *['"]\/__NUXT_BASE__(\/[^'"]*)['"]/g, 'from "$1"');
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
s.replace(delimiterRE, (r) => "`" + r.replace(/\/__NUXT_BASE__\//g, "${__publicAssetsURL()}").slice(1, -1) + "`");
|
|
66
|
-
}
|
|
63
|
+
const delimiterRE = /(?<!(const base = |from *))(`([^`]*)\/__NUXT_BASE__\/([^`]*)`|'([^\n']*)\/__NUXT_BASE__\/([^\n']*)'|"([^\n"]*)\/__NUXT_BASE__\/([^\n"]*)")/g;
|
|
64
|
+
s.replace(delimiterRE, (r) => "`" + r.replace(/\/__NUXT_BASE__\//g, "${__publicAssetsURL()}").slice(1, -1) + "`");
|
|
67
65
|
if (s.hasChanged()) {
|
|
68
66
|
return {
|
|
69
67
|
code: s.toString(),
|
|
70
|
-
map: s.generateMap({ source: id, includeContent: true })
|
|
68
|
+
map: options.sourcemap && s.generateMap({ source: id, includeContent: true })
|
|
71
69
|
};
|
|
72
70
|
}
|
|
73
71
|
}
|
|
@@ -954,6 +952,7 @@ async function bundle(nuxt) {
|
|
|
954
952
|
const mfs = nuxt.options.dev ? createMFS() : null;
|
|
955
953
|
const compilers = webpackConfigs.map((config) => {
|
|
956
954
|
config.plugins.push(DynamicBasePlugin.webpack({
|
|
955
|
+
sourcemap: nuxt.options.sourcemap,
|
|
957
956
|
globalPublicPath: "__webpack_public_path__"
|
|
958
957
|
}));
|
|
959
958
|
const compiler = webpack(config);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/webpack-builder",
|
|
3
|
-
"version": "3.0.0-rc.
|
|
3
|
+
"version": "3.0.0-rc.2",
|
|
4
4
|
"repository": "nuxt/framework",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
"prepack": "unbuild"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@babel/core": "^7.17.
|
|
19
|
+
"@babel/core": "^7.17.10",
|
|
20
20
|
"@nuxt/friendly-errors-webpack-plugin": "^2.5.2",
|
|
21
|
-
"@nuxt/kit": "^3.0.0-rc.
|
|
22
|
-
"autoprefixer": "^10.4.
|
|
21
|
+
"@nuxt/kit": "^3.0.0-rc.2",
|
|
22
|
+
"autoprefixer": "^10.4.7",
|
|
23
23
|
"css-loader": "^6.7.1",
|
|
24
24
|
"css-minimizer-webpack-plugin": "^3.4.1",
|
|
25
25
|
"cssnano": "^5.1.7",
|
|
26
26
|
"esbuild-loader": "^2.18.0",
|
|
27
27
|
"escape-string-regexp": "^5.0.0",
|
|
28
28
|
"file-loader": "^6.2.0",
|
|
29
|
-
"fork-ts-checker-webpack-plugin": "^7.2.
|
|
29
|
+
"fork-ts-checker-webpack-plugin": "^7.2.11",
|
|
30
30
|
"fs-extra": "^10.1.0",
|
|
31
31
|
"hash-sum": "^2.0.0",
|
|
32
32
|
"lodash-es": "^4.17.21",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"mlly": "^0.5.2",
|
|
37
37
|
"pathe": "^0.2.0",
|
|
38
38
|
"pify": "^5.0.0",
|
|
39
|
-
"postcss": "^8.4.
|
|
39
|
+
"postcss": "^8.4.13",
|
|
40
40
|
"postcss-import": "^14.1.0",
|
|
41
41
|
"postcss-loader": "^6.2.1",
|
|
42
42
|
"postcss-url": "^10.1.3",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"webpackbar": "^5.0.2"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@nuxt/schema": "^3.0.0-rc.
|
|
58
|
+
"@nuxt/schema": "^3.0.0-rc.2",
|
|
59
59
|
"@types/pify": "^5.0.1",
|
|
60
60
|
"@types/webpack-bundle-analyzer": "^4.4.1",
|
|
61
61
|
"@types/webpack-dev-middleware": "^5.0.2",
|