Giter Club home page Giter Club logo

Comments (3)

Molin123 avatar Molin123 commented on May 24, 2024

@ljg601105597 通过在html头部引入一段js脚本来动态的设置viewport

from react-molin.

cz2013 avatar cz2013 commented on May 24, 2024

我在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.

Molin123 avatar Molin123 commented on May 24, 2024

@cz2013 建议升级到3

from react-molin.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.