Giter Site home page Giter Site logo

Comments (6)

2betop avatar 2betop commented on June 10, 2024

谁先命中,谁在前面啊,可以控制顺序,要不你把你现有的贴出来。

from fis3-packager-deps-pack.

asoiso avatar asoiso commented on June 10, 2024

编译后的顺序是这个样子的

<link rel="stylesheet" href="/pkg/common_8f90b40.css">
<link rel="stylesheet" type="text/css" href="/pkg/lib_1c96d10.css">
<link rel="stylesheet" type="text/css" href="/pkg/yyg_b5f5c88.css">

我需要的是这个样子的

<link rel="stylesheet" type="text/css" href="/pkg/lib_1c96d10.css">
<link rel="stylesheet" href="/pkg/common_8f90b40.css">
<link rel="stylesheet" type="text/css" href="/pkg/yyg_b5f5c88.css">

from fis3-packager-deps-pack.

2betop avatar 2betop commented on June 10, 2024

我感觉用注释标记下依赖就好了, 你贴的是打包后的代码实在是不知道源码是什么样的。

假如: lib_xxx.css 里面有 a.css 然后 common_xxx.css 里面有 b.css. 如果 b.css 是要去复写 a.css 那吗你先标记下 b.css 是依赖 a.css 的嘛,这样, lib_xxx.css 就会再 common_xxx.css 的前面。

from fis3-packager-deps-pack.

asoiso avatar asoiso commented on June 10, 2024
fis.match('::package', {
    packager: fis.plugin('deps-pack', {

        'pkg/lib.js': [
            '/yyg/index.js:deps',
            '/mall/index.js:deps',
            '!/common/**',
            '/node_modules/**'
        ],
        'pkg/lib.css': [
            '/yyg/index.js:deps',
            '/mall/index.js:deps',
            '!/common/**',
            '/node_modules/**'
        ],
        'pkg/common.js': [
            '/yyg/index.js:deps',
            '/mall/index.js:deps',
            '/common/**',
            '!/node_modules/**'
        ],
        'pkg/common.css': [
            '/yyg/index.js:deps',
            '/mall/index.js:deps',
            '/common/**',
            '!/node_modules/**'
        ],
        'pkg/yyg.js': [
            '/yyg/index.js',
            '/yyg/index.js:deps',
            '!/common/**',
            '!/node_modules/**',
        ],
        'pkg/yyg.css': [
            '/yyg/index.js',
            '/yyg/index.js:deps',
            '!/common/**',
            '!/node_modules/**',
        ]
})

yyg/index.js,vux中带有css

import Vue from 'vue'
import VueRouter from 'vue-router'
import configRouter from './route/configRouter'
import App from './page/app'
import Vux from 'vux'
import '/common/asset/css/base.scss'
import '/common/asset/iconfont/iconfont.css'
import './asset/yyg.scss'

from fis3-packager-deps-pack.

2betop avatar 2betop commented on June 10, 2024

从你的需求来看,其实跟打包没关系,而是跟 资源加载顺序有关系。应该是 postpackager-loader 有关。

from fis3-packager-deps-pack.

ocian avatar ocian commented on June 10, 2024
'/client/pkg/discount.css': [
            'page/discount/*.less',
            'page/discount/*.css',
        ]

这里有两个 less 文件,打包前和打包后两个文件的顺序是反的,在这里应该怎么控制在开发环境和打包后的环境一致呢?

from fis3-packager-deps-pack.

Related Issues (20)

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.