Comments (3)
@ljg601105597 通过在html头部引入一段js脚本来动态的设置viewport
from react-molin.
我在webpack2中使用
{
test: /.less$/,
// use: ['style-loader', 'css-loader', 'less-loader'], // 将css打包到js里面
// 将css单独打包,需要plugins
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
//resolve-url-loader may be chained before lesss-loader if necessary
use: [
'css-loader',
'less-loader',
{
loader: 'postcss-loader',
options: {
plugins:(loader) => [
pxtorem({ // 高清方案,将px转换为rem
rootValue: 100,
propWhiteList: [],
})
]
}
}
]
})
}
这种方式报错:
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.resolve has an unknown property 'modulesDirectories'. These properties are valid:
object { alias?, aliasFields?, cachePredicate?, descriptionFiles?, enforceExtension?, enforceModuleExtension?, extensions?, fileSyst
em?, mainFields?, mainFiles?, moduleExtensions?, modules?, plugins?, resolver?, symlinks?, unsafeCache?, useSyncFileSystemCalls? } - configuration.resolve.extensions[0] should not be empty.
但是我需要使用你们用的这种方式,根据不同的路径进行不同的plugins参数配置。
请问有什么解决方法吗?还是升级到webpack3才可以???
from react-molin.
@cz2013 建议升级到3
from react-molin.
Related Issues (14)
- 貌似有报错 HOT 8
- 没有看懂试例? HOT 4
- 引入antd-mobile 中的Popup组件报错 HOT 11
- npm run start 报错 HOT 1
- less编译时报错
- this.props.match.path 找不到
- 设置host,提个小建议 HOT 4
- 部署到tomcat,提示找不到访问路经 HOT 1
- 感觉JSX的语法配置还是要写在webpack配置文件里面 HOT 1
- 可以加eslint校验代码 HOT 1
- 本地项目引入antd-mobile源码
- 请教您一个关于Router按需加载的问题 HOT 6
- fetch HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-molin.