Open michelvermeulen opened 3 years ago
Here's my vue.config.js (with code splitting disabled to make it work):
module.exports = {
pages: {
popup: {
template: "public/browser-extension.html",
entry: "./src/popup/main.js",
title: "Popup",
},
},
chainWebpack: config => {
config.optimization.delete("splitChunks")
},
pluginOptions: {
browserExtension: {
components: {
background: true,
contentScripts: true,
popup: true,
},
componentOptions: {
background: {
entry: "src/background.js",
},
contentScripts: {
entries: {
"content-script": "src/content-scripts/content-script.js",
},
},
},
},
},
}
@michelvermeulen I've got the same issue. Have you managed to find a workaround?
Did you find out anything to solve this problem?
@hakanaltindis I tried different old versions of node and some of them worked.
node:10, node:11, node:12, node:13, node:14 worked, but more latest versions didn't.
Hi everybody,
I used a workaround and worked for me. :) I got the same stack trace and message like below.
TypeError: file.split is not a function
at removeLoaders (//node_modules/@soda/friendly-errors-webpack-plugin/src/formatters/defaultError.js:23:22) at displayError (//node_modules/@soda/friendly-errors-webpack-plugin/src/formatters/defaultError.js:10:21)
Suddenly, I realize that my code had some errors and then webpack tried to write error's file name to console.. But file did not exist. So webpack threw an exception.
So I added the below code statment in this file node_modules\@soda\friendly-errors-webpack-plugin\src\formatters\defaultError.js
before throw exception to see my errors' details.
After that I can see my real errors and I fixed them. Finally my code was built. :)
I hope it can help you.
Describe the bug I have a NPM error when building for production which doesn't happen when I disable code splitting.
TypeError: file.split is not a function
To Reproduce If the bug is a build error, please include the exact command used, and any terminal output.
npm run build
Expected behavior It should compile.
Reproducible Example
Additional context package.json