美文网首页
import "!!file-loader? 是什么意思

import "!!file-loader? 是什么意思

作者: cdzhd | 来源:发表于2019-09-25 07:55 被阅读0次

    https://webpack.js.org/concepts/loaders/#inline

    Inline

    It's possible to specify loaders in an import statement, or any equivalent "importing" method. Separate loaders from the resource with !. Each part is resolved relative to the current directory.

    importStylesfrom'style-loader!css-loader?modules!./styles.css';

    It's possible to override any loaders, preLoaders and postLoaders from the configuration by prefixing the inline import statement:

    Prefixing with ! will disable all configured normal loaders

    importStylesfrom'!style-loader!css-loader?modules!./styles.css';

    Prefixing with !! will disable all configured loaders (preLoaders, loaders, postLoaders)

    importStylesfrom'!!style-loader!css-loader?modules!./styles.css';

    Prefixing with -! will disable all configured preLoaders and loaders but not postLoaders

    importStylesfrom'-!style-loader!css-loader?modules!./styles.css';

    Options can be passed with a query parameter, e.g. ?key=value&foo=bar, or a JSON object, e.g. ?{"key":"value","foo":"bar"}.

    Use module.rules whenever possible, as this will reduce boilerplate in your source code and allow you to debug or locate a loader faster if something goes south.

    相关文章

      网友评论

          本文标题:import "!!file-loader? 是什么意思

          本文链接:https://www.haomeiwen.com/subject/blriuctx.html