我在 webpack.config.js里加了这一句 { test : /.stringKaTeX parse error: Expected 'EOF', got '}' at position 23: …r:'html-loader'}̲
然后用 webpack打包 …/,loader:‘html-loader’}
^
SyntaxError: Unexpected token {
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:657:28)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mmall-fe@1.0.0 dev: WEBPACK_ENV=dev webpack-dev-server --inline --port 8088
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mmall-fe@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jianjundong/.npm/_logs/-12-27T12_05_58_546Z-debug.log
/Applications/mmall/mmall-fe/webpack.config.js:36
{ test : /.string$/,loader:‘html-loader’}
^
SyntaxError: Unexpected token {
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:657:28)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mmall-fe@1.0.0 dev: WEBPACK_ENV=dev webpack-dev-server --inline --port 8088
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mmall-fe@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jianjundong/.npm/_logs/-12-27T12_05_58_546Z-debug.log
谁知道着么解决。