samrith-s / parcel-plugin-structurize

A plugin to customize the output (dist) directory structure during production.
MIT License
41 stars 6 forks source link

Path resolving doesn't work #23

Closed sa9sha9 closed 4 years ago

sa9sha9 commented 4 years ago

It's almost same issue as #12 and #14.

My src/ directory is

src/
  css
    index.css
  js
    index.js
  pages
    index.html

and build it, then,

build/
  css
    css.hash.css
  js
    js.hash.js
  pages
    index.html

The paths to assets(css and js) in index.html is flat path such like <link rel="stylesheet" href="css.hash.css" /> and <script src="js.hash.js"></script>. It doesn't resolve path.

Configuration

"parcel-plugin-structurize": {
        "scripts": {
            "match": "*.{js,js.map}",
            "folder": "js"
        },
        "styles": {
            "match": "*.{css,css.map}",
            "folder": "css"
        },
        "assets": {
            "match": "*.{png,svg,jpg,jpg2,jpeg,gif,bmp,webm}",
            "folder": "assets"
        }
    }
samrith-s commented 4 years ago

Can you provide me with a repository to test it out? Off the top of my head, I think it's a problem with publicUrl setting. Once that's set, I think it normally should work as expected.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.