diff --git a/templates/webpack.vue.js b/templates/webpack.vue.js index ad354e56..043d0a9f 100644 --- a/templates/webpack.vue.js +++ b/templates/webpack.vue.js @@ -1,4 +1,4 @@ -const { relative, resolve } = require("path"); +const { relative, resolve, sep } = require("path"); const webpack = require("webpack"); const CleanWebpackPlugin = require("clean-webpack-plugin"); @@ -56,7 +56,7 @@ module.exports = env => { const appResourcesFullPath = resolve(projectRoot, appResourcesPath); const entryModule = nsWebpack.getEntryModule(appFullPath); - const entryPath = resolve(appFullPath, entryModule); + const entryPath = `.${sep}${entryModule}`; console.log(`Bundling application for entryPath ${entryPath}...`); const config = { @@ -150,7 +150,7 @@ module.exports = env => { }, module: { rules: [{ - test: entryPath, + test: new RegExp(entryPath + ".(js|ts)"), use: [ // Require all Android app components platform === "android" && {