webpack / webpack-sources

Source code handling classes for webpack
MIT License
261 stars 71 forks source link

TypeError: value.split is not a function #101

Closed Kilims closed 3 years ago

Kilims commented 3 years ago

I am going to setup my own scaffold,and here is the project repo

https://github.com/Kilims/typescript_antd_antdMobile

while running with yarn run start, it could work perfectly

but when i go with yarn run build, it shows errors below

TypeError: value.split is not a function
    at OriginalSource.node (/Users/yejinlei/Documents/playground/personal/typescript/my-app/node_modules/webpack-sources/lib/OriginalSource.js:34:21)
    at /Users/yejinlei/Documents/playground/personal/typescript/my-app/node_modules/webpack-sources/lib/ConcatSource.js:59:50
    at Array.map (<anonymous>)
    at ConcatSource.node (/Users/yejinlei/Documents/playground/personal/typescript/my-app/node_modules/webpack-sources/lib/ConcatSource.js:58:63)
    at ConcatSource.proto.sourceAndMap (/Users/yejinlei/Documents/playground/personal/typescript/my-app/node_modules/webpack-sources/lib/SourceAndMapMixin.js:29:18)
    at CachedSource.sourceAndMap (/Users/yejinlei/Documents/playground/personal/typescript/my-app/node_modules/webpack-sources/lib/CachedSource.js:58:31)
    at OptimizeCssAssetsWebpackPlugin.processCss (/Users/yejinlei/Documents/playground/personal/typescript/my-app/node_modules/optimize-css-assets-webpack-plugin/src/index.js:44:44)
    at Object.processor (/Users/yejinlei/Documents/playground/personal/typescript/my-app/node_modules/optimize-css-assets-webpack-plugin/src/index.js:13:18)
    at /Users/yejinlei/Documents/playground/personal/typescript/my-app/node_modules/last-call-webpack-plugin/src/index.js:150:10
    at arrayEach (/Users/yejinlei/Documents/playground/personal/typescript/my-app/node_modules/lodash/_arrayEach.js:15:9)
    at forEach (/Users/yejinlei/Documents/playground/personal/typescript/my-app/node_modules/lodash/forEach.js:38:10)
    at OptimizeCssAssetsWebpackPlugin.process (/Users/yejinlei/Documents/playground/personal/typescript/my-app/node_modules/last-call-webpack-plugin/src/index.js:147:5)
    at /Users/yejinlei/Documents/playground/personal/typescript/my-app/node_modules/last-call-webpack-plugin/src/index.js:178:28
    at _next0 (eval at create (/Users/yejinlei/Documents/playground/personal/typescript/my-app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:7:17)
    at eval (eval at create (/Users/yejinlei/Documents/playground/personal/typescript/my-app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:25:1)

could kindly help with that ? tons of thanks

alexander-akait commented 3 years ago

Please open an issue in optimize-css-assets-webpack-plugin repo, we strongly recommend to switch on official plugin https://github.com/webpack-contrib/css-minimizer-webpack-plugin, we can't fix here bug inside the plugin, sorry