File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 11const { rspack } = require ( '@rspack/core' ) ;
22const { VueLoaderPlugin } = require ( 'vue-loader' ) ;
3+ const path = require ( 'path' ) ;
4+
5+ const toPosixPath = ( filepath ) => ( path . sep === '/' ? filepath : filepath . replace ( / \\ / g, '/' ) ) ;
36
47/** @type {import('@rspack/cli').Configuration } */
58const config = {
@@ -10,7 +13,11 @@ const config = {
1013 devServer : {
1114 historyApiFallback : true ,
1215 } ,
13- devtool : false ,
16+ output : {
17+ // ensure the source map is correct for .vue files
18+ devtoolModuleFilenameTemplate : ( info ) => toPosixPath ( info . absoluteResourcePath ) ,
19+ } ,
20+ devtool : process . env . NODE_ENV === 'development' ? 'cheap-module-source-map' : false ,
1421 plugins : [
1522 new VueLoaderPlugin ( ) ,
1623 new rspack . HtmlRspackPlugin ( {
@@ -30,7 +37,6 @@ const config = {
3037 test : / \. t s $ / ,
3138 loader : 'builtin:swc-loader' ,
3239 options : {
33- sourceMap : true ,
3440 jsc : {
3541 parser : {
3642 syntax : 'typescript' ,
You can’t perform that action at this time.
0 commit comments