Closed
Description
import.meta
is only recognized by Webpack 5 (webpack/webpack#6719 (comment)) and it will cause error like this in Webpack 4.
ERROR in ./src/App.svelte 97:303
Module parse failed: 'import' and 'export' may only appear at the top level (97:303)
File was processed with these loaders:
* ./node_modules/svelte-loader/index.js
You may need an additional loader to handle the result of these loaders.
| }
| }
> import * as ___SVELTE_HMR_HOT_API from '/home/ishitatsuyuki/Documents/projectl/node_modules/svelte-loader/lib/hot-api.js';import ___SVELTE_HMR_HOT_API_PROXY_ADAPTER from '/home/ishitatsuyuki/Documents/projectl/node_modules/svelte-hmr/runtime/proxy-adapter-dom.js';if (module && module.hot) { if (false) import.meta.hot.accept(); App = ___SVELTE_HMR_HOT_API.applyHmr({ m: module, id: "\"src/App.svelte\"", hotOptions: {"preserveLocalState":false,"noPreserveStateKey":["@hmr:reset","@!hmr"],"preserveAllLocalStateKey":"@hmr:keep-all","preserveLocalStateKey":"@hmr:keep","noReload":false,"optimistic":true,"acceptNamedExports":true,"acceptAccessors":true,"injectCss":true,"cssEjectDelay":100,"native":false,"compatVite":false,"importAdapterName":"___SVELTE_HMR_HOT_API_PROXY_ADAPTER","absoluteImports":true,"noOverlay":false}, Component: App, ProxyAdapter: ___SVELTE_HMR_HOT_API_PROXY_ADAPTER, acceptable: true, cssId: undefined, nonCssHash: undefined, ignoreCss: false, }); }
| export default App;
|
@ ./src/renderer.ts 31:0-23
@ multi ./src/renderer.ts webpack-hot-middleware/client
This was introduced by rixo@a5e0973. Perhaps it could be reverted.
Metadata
Metadata
Assignees
Labels
No labels