【发布时间】:2020-07-24 20:03:16
【问题描述】:
错误:
./node_modules/quill-emoji/dist/quill-emoji.css
ModuleParseError: Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
在_app.js,我有:
import "quill-emoji/dist/quill-emoji.css";
在next.config.js:
const withCSS = require('@zeit/next-css');
const withImages = require("next-images");
const withPlugins = require("next-compose-plugins");
if (typeof require !== 'undefined') {
require.extensions['.less'] = () => {};
require.extensions['.css'] = file => {};
}
module.exports = withPlugins([
withImages,
withCSS
], {
devIndicators: {
autoPrerender: false,
},
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
...
})
【问题讨论】:
标签: javascript reactjs babeljs next.js