Closed w3cui closed 6 years ago
@w3cui 你尝试清空 node_modules
,使用 npm
安装 uiw@1.7.0
./node_modules/_uiw@1.7.0@uiw/lib/list/style/index.less Module parse failed: Unexpected character '@' (1:0) You may need an appropriate loader to handle this file type. | @List:~"w-list"; |
---|---|
.@{List} { |
@ ./node_modules/_uiw@1.7.0@uiw/lib/list/List.js 33:0-29 @ ./node_modules/_uiw@1.7.0@uiw/lib/list/index.js @ ./node_modules/_uiw@1.7.0@uiw/lib/index.js @ ./src/Module/index.jsx @ ./src/Routes/routes.jsx @ ./src/main.jsx @ multi ./src/main.jsx
好像能读取到了,但是报这个@符合的错! 我webpack里面@符号是定义的项目根目录是不是有影响?
我的webpack 里面配置了: ` resolve: { // 解析模块请求的选项 // (不适用于对 loader 解析)
modules: [
"node_modules",
path.resolve(__dirname, "app")
],
// 用于查找模块的目录
extensions: [".js", ".json", ".jsx", ".css"],
// 使用的扩展名
alias: {
// 模块别名列表
"@": APP_DIR
// 起别名:"module" -> "new-module" 和 "module/path/file" -> "new-module/path/file"
}
},`
是不是有影响?
@w3cui 你要在webpack中配置 less 解析
{
test: /\.(css|less)$/,
use: [
require.resolve('style-loader'),
{
loader: require.resolve('css-loader'),
options: {
modules: true,
localIdentName: '[name]-[hash:base64:5]',
importLoaders: 1,
},
},
{
loader: require.resolve('postcss-loader'),
options: {
ident: 'postcss', // https://webpack.js.org/guides/migrating/#complex-options
plugins: () => [
require('postcss-flexbugs-fixes'),
autoprefixer({
browsers: [
'>1%',
'last 4 versions',
'Firefox ESR',
],
flexbox: 'no-2009',
}),
px2rem({
rootValue: 100,
selectorBlackList: ['html']
})
],
},
},
require.resolve('less-loader'),
]
}
@jaywcjlove
我这个配置了的我项目里面自己写的less
都能解析 这是我的配置需要怎么去修改?
module: { rules: [{ test: /\.js[x]?$/, use: [{ loader: "babel-loader", }] }, { test: /\.html$/, loader: 'html-loader' }, { test: /\.js$/, loader: 'babel-loader', include: [ APP_DIR ] }, { test: /\.css$/, loader: ExtractTextPlugin.extract({ fallback: 'style-loader', use: 'css-loader?modules' }), include: [ APP_DIR ] }, { test: /\.less$/, loader: ExtractTextPlugin.extract({ fallback: 'style-loader', use: 'css-loader?!less-loader' }), include: [ APP_DIR ] }, { test: /\.sass$/, loader: ExtractTextPlugin.extract({ fallback: 'style-loader', use: 'css-loader?!sass-loader' }), include: [ APP_DIR ] }, { test: /\.(gif|jpg|png|woff|svg|eot|ttf)\??.*$/, loader: 'url-loader', options: { limit: 10000, name: 'img/[name].[hash:7].[ext]' } }, { test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, loader: 'url-loader', options: { limit: 10000, name: 'media/[name].[hash:7].[ext]' } }, ] }
@w3cui sass 跟 less 冲突了?这个应该不可能的事情
我把sass清除了一样的还是报错!
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/list/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @List:~"w-list";
|
| .@{List} {
@ ./node_modules/_uiw@1.7.0@uiw/lib/list/List.js 33:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/list/index.js
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/copy-to-clipboard/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @copy-to-clipboard:~"w-copy-to-clipboard";
|
| .@{copy-to-clipboard} {
@ ./node_modules/_uiw@1.7.0@uiw/lib/copy-to-clipboard/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/form/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @form-cls: ~"w-form";
| @form-item-cls: ~"@{form-cls}-item";
|
@ ./node_modules/_uiw@1.7.0@uiw/lib/form/index.js 15:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/upload/style/dragger.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
|
@ ./node_modules/_uiw@1.7.0@uiw/lib/upload/Dragger.js 33:0-31
@ ./node_modules/_uiw@1.7.0@uiw/lib/upload/index.js
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/button/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
|
@ ./node_modules/_uiw@1.7.0@uiw/lib/button/Button.js 33:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/button/index.js
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/radio/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
|
@ ./node_modules/_uiw@1.7.0@uiw/lib/radio/index.js 19:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/checkbox/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
|
@ ./node_modules/_uiw@1.7.0@uiw/lib/checkbox/index.js 15:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/card/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
|
@ ./node_modules/_uiw@1.7.0@uiw/lib/card/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/tag/style/tag-group.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
|
@ ./node_modules/_uiw@1.7.0@uiw/lib/tag/TagGroup.js 41:0-33
@ ./node_modules/_uiw@1.7.0@uiw/lib/tag/index.js
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/notification/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
|
@ ./node_modules/_uiw@1.7.0@uiw/lib/notification/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/breadcrumb/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
|
@ ./node_modules/_uiw@1.7.0@uiw/lib/breadcrumb/index.js 15:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/heat-map/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
|
@ ./node_modules/_uiw@1.7.0@uiw/lib/heat-map/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/input-number/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
|
@ ./node_modules/_uiw@1.7.0@uiw/lib/input-number/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/input/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
|
@ ./node_modules/_uiw@1.7.0@uiw/lib/input/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/menu/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
|
@ ./node_modules/_uiw@1.7.0@uiw/lib/menu/index.js 27:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/loading/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
|
@ ./node_modules/_uiw@1.7.0@uiw/lib/loading/index.js 25:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/button/style/buttons-group.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
|
@ ./node_modules/_uiw@1.7.0@uiw/lib/button/ButtonGroup.js 33:0-37
@ ./node_modules/_uiw@1.7.0@uiw/lib/button/index.js
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/table/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
|
@ ./node_modules/_uiw@1.7.0@uiw/lib/table/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/tag/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
|
@ ./node_modules/_uiw@1.7.0@uiw/lib/tag/Tag.js 37:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/tag/index.js
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/paging/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
|
@ ./node_modules/_uiw@1.7.0@uiw/lib/paging/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/select/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
|
@ ./node_modules/_uiw@1.7.0@uiw/lib/select/index.js 19:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/switch/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
|
@ ./node_modules/_uiw@1.7.0@uiw/lib/switch/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/alert/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
|
@ ./node_modules/_uiw@1.7.0@uiw/lib/alert/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/message/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
| .w-message {
@ ./node_modules/_uiw@1.7.0@uiw/lib/message/index.js 26:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/tooltip/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
| .w-tooltip {
@ ./node_modules/_uiw@1.7.0@uiw/lib/tooltip/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/layout/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
| @import "./row.less";
@ ./node_modules/_uiw@1.7.0@uiw/lib/layout/index.js 15:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/date-picker/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
| @import './time-select.less';
@ ./node_modules/_uiw@1.7.0@uiw/lib/date-picker/index.js 30:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/modal/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
| @w-modal:~"w-modal";
@ ./node_modules/_uiw@1.7.0@uiw/lib/modal/index.js 15:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/tabs/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../../style/variables.less";
| @w-tabs:~'w-tabs';
| .@{w-tabs} {
@ ./node_modules/_uiw@1.7.0@uiw/lib/tabs/index.js 15:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/icon/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "~uiw-iconfont/fonts/w-iconfont.css";
| .w-icon-spin:before {
| animation: loading-circle 1s infinite linear;
@ ./node_modules/_uiw@1.7.0@uiw/lib/icon/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/steps/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @stepsPrefixClass:~"w-steps";
|
| .@{stepsPrefixClass} {
@ ./node_modules/_uiw@1.7.0@uiw/lib/steps/index.js 15:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/timestamp/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @timestamp:~"w-timestamp";
|
| .@{timestamp} {
@ ./node_modules/_uiw@1.7.0@uiw/lib/timestamp/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/affix/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @w-affix:~"w-affix";
|
| // .@{w-affix}{
@ ./node_modules/_uiw@1.7.0@uiw/lib/affix/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/badge/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @w-badge:~"w-badge";
| .@{w-badge} {
| position: relative;
@ ./node_modules/_uiw@1.7.0@uiw/lib/badge/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/calendar/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @w-calendar:~"w-calendar";
|
| .@{w-calendar} {
@ ./node_modules/_uiw@1.7.0@uiw/lib/calendar/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/collapse/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @w-collapse: ~'w-collapse';
|
| .@{w-collapse} {
@ ./node_modules/_uiw@1.7.0@uiw/lib/collapse/index.js 15:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/divider/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @w-divider:~"w-divider";
|
| .@{w-divider} {
@ ./node_modules/_uiw@1.7.0@uiw/lib/divider/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/dropdown/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @w-dropdown:~"w-dropdown";
|
| .@{w-dropdown} {
@ ./node_modules/_uiw@1.7.0@uiw/lib/dropdown/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/progress/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @w-progress-prefix: ~"w-progress";
|
| .@{w-progress-prefix} {
@ ./node_modules/_uiw@1.7.0@uiw/lib/progress/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/rate/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @w-rate:~"w-rate";
| .@{w-rate} {
| list-style: none;
@ ./node_modules/_uiw@1.7.0@uiw/lib/rate/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/tree/style/index.less
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @w-tree:~"w-tree";
|
| .@{w-tree} {
@ ./node_modules/_uiw@1.7.0@uiw/lib/tree/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/avatar/style/index.less
Module parse failed: Unexpected character '@' (2:0)
You may need an appropriate loader to handle this file type.
|
| @avatar-prefix-cls: ~"w-avatar";
|
| .@{avatar-prefix-cls} {
@ ./node_modules/_uiw@1.7.0@uiw/lib/avatar/index.js 37:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/carousel/style/index.less
Module parse failed: Unexpected character '@' (4:0)
You may need an appropriate loader to handle this file type.
| /*@import "~slick-carousel/slick/slick-theme.css";*/
|
| @import "../../style/variables.less";
| @import "../../style/mixins/index.less";
|
@ ./node_modules/_uiw@1.7.0@uiw/lib/carousel/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/transition/style/index.less
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type.
| .w-animate {
| transition: all 0.3s ease;
| &.is-down {
@ ./node_modules/_uiw@1.7.0@uiw/lib/transition/index.js 41:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/back-top/style/index.less
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type.
| .w-back-top {
| display: inline-block;
| transition: opacity 0.2s linear 0s, visibility;
@ ./node_modules/_uiw@1.7.0@uiw/lib/back-top/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/input-password/style/index.less
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type.
| .w-input-password.password-show.w-input-icon {
| .event {
| color: #0fa120;
@ ./node_modules/_uiw@1.7.0@uiw/lib/input-password/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
ERROR in ./node_modules/_uiw@1.7.0@uiw/lib/slider/style/index.less
Module parse failed: Unexpected token (2:0)
You may need an appropriate loader to handle this file type.
|
| .w-slider {
| width: 100%;
| height: 4px;
@ ./node_modules/_uiw@1.7.0@uiw/lib/slider/index.js 11:0-29
@ ./node_modules/_uiw@1.7.0@uiw/lib/index.js
@ ./src/Module/index.jsx
@ ./src/Routes/routes.jsx
@ ./src/main.jsx
@ multi ./src/main.jsx
@w3cui 你的loader这样配置配置试一试?
{
test: /\.(css|less)$/,
use:[ 'style-loader','css-loader','less-loader'],
},
现在成功了!! 谢谢。。。 我想问一下: 我之前的写法怎么在我的项目里面写less就可以,导入uiw 后就报解析错误,这个是什么原因造成的??
@w3cui 你的配置方法好像是 webpack1 or 2 遗留下的配置方法,可能是新的 less-loader
不兼容老的配置方法。
嗯! 好的
cnpm install uiw --save