Skip to content

The compatible path on windows system. #12

Open
@zhazhaxia

Description

@zhazhaxia

image

Originally posted by @liximomo in #10 (comment)


Webpack use eval to exceute your template code.
So the result maybe for the following code.

const p = path.win32.join('e:','a.js'); // e:\\a.js
const template = `var api = '${p}'`; // var api = \'e\\a.js\'

// use eval excute template on browser

eval(template);

console.log(api) // e:a.js

This exception caught on browser because of the eval function that webpack use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions