Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New [transformFileName] loader-specific option has been implemented. #738

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 22, 2018

  1. New [transformFileName] loader-specific option has been implemented.

        REASON
    
    A reason of implementing this feature is [VueJS TypeScript SFC]
    compilation trouble with the usage of [babel, babel-loader].
    Issue environment:  [email protected],  [email protected]., [email protected],
    [email protected])
    
    Ordinal *.ts files are compiled OK
    but SFC-component - the [babel-loader] doesn’t understand that
    [vue-loader] gives it TypeScript-code.
    
    I know, that similar problem solved for the [ts-loader] by its option
    [appendTsSuffixTo], but I haven't found any similar settings for
    [babel-loader].
    
        DESCRIPTION
    
    Webpack's loader have two file names field in a loader's options object:
    filename
    sourceFilename
    
    If I've found out correctly, the last one is strongly bound
    to a physical resource (a file) and the first one is a logical name
    in some sense.
    Consequently, I change the fist file name options.
    Well, in my test build that solution works without any negative impact.
    
        OPTION'S STRUCTURE
    
    transformFileName:{
        pattern: RegEx,
        replace: 'string_of_content_instead_of_regex'
    }
    aklimov committed Nov 22, 2018
    Configuration menu
    Copy the full SHA
    21205ef View commit details
    Browse the repository at this point in the history