Closed wlc534 closed 3 years ago
配置一下 https://github.com/moonrailgun/snowpack-plugin-less/blob/master/plugin.js
它是支持的,要打开 javascriptEnabled
{
loader: 'less-loader',
options: {
javascriptEnabled: true
}
}
@chenshuai2144 打开了 还是报错,javascriptEnabled应该是less-loader 的options?
🧐 问题描述
snowpack 项目在集成pro-layout 无法运行,在集成antd 能正常运行。并且已安装对应插件 plugins: ['@snowpack/plugin-react-refresh', '@snowpack/plugin-dotenv','snowpack-plugin-less'],
[snowpack] ! building dependencies... [snowpack] Failed to load node_modules/@ant-design/pro-layout/es/Header.less Unexpected character '@' (Note that you need plugins to import files that are not JavaScript)
💻 示例代码
import ProLayout, { PageContainer, SettingDrawer } from '@ant-design/pro-layout'; import defaultProps from './_defaultProps';
🚑 其他信息
[snowpack] ! building dependencies... [snowpack] Failed to load node_modules/@ant-design/pro-layout/es/Header.less Unexpected character '@' (Note that you need plugins to import files that are not JavaScript)