Giter VIP home page Giter VIP logo

Comments (7)

moarwick avatar moarwick commented on May 18, 2024 1

Ok, finally found a moment to look into implementing copy-webpack-plugin. I believe it's working so, if still interested, please try 0.6.2. I don't have a Windows system handy so if you try it, pls let me know how it goes. Thanks!

from elm-webpack-starter.

MartinKavik avatar MartinKavik commented on May 18, 2024 1

Nice! Everything seems to be working on Win.

@moarwick: Btw I want to build some projects on this repo in the near future and I have some ideas - e.g. integrate webpack-notifier / show errors in the browser window. So I can help more If you want.

from elm-webpack-starter.

MartinKavik avatar MartinKavik commented on May 18, 2024

Hi,

Windows doesn't know command cp, so the alternative for Win is:

"build": "rimraf dist && webpack && xcopy /S \"src/img/*\" \"dist/img/\" /F /Y && xcopy \"src/favicon.ico\" \"dist/\" /F /Y",

But it is ugly solution.
@moarwick: Is it possible to use something as copy-webpack-plugin? Thanks.

from elm-webpack-starter.

moarwick avatar moarwick commented on May 18, 2024

yes, i've seen the copy-webpack-plugin out there, will give it a try as soon as i find some time.. in the meantime, your solution should help @tsimbalar (and other Win users) -- thanks!

from elm-webpack-starter.

kittykatattack avatar kittykatattack commented on May 18, 2024

Hi, I'm on Windows and would love to try this!
What's the best way to upgrade to the latest version without over-writing my current work?

from elm-webpack-starter.

moarwick avatar moarwick commented on May 18, 2024

If you didn't modify your webpack configs or added any dependencies to package.json, just clone a new version of this repo, then copy the contents of your project's src/ folder over, and.. it should just work ;)

from elm-webpack-starter.

kittykatattack avatar kittykatattack commented on May 18, 2024

@moarwick Thank you, it did work! 👍

I also copied over my elm-package.json file and then ran elm package install which installed all the new packages I was using.
I also had to do a local re-install of a few npm packages I was using, like marked.js.
The only other thing I did was manually update the new version of webpack.config.js so that my custom folders in the src directory would be copied over into dist:

 plugins: [
      new CopyWebpackPlugin([
        {
          from: 'src/images/',
          to:   'images/'
        },
        {
          from: 'src/fonts/',
          to:   'fonts/'
        },
        {
          from: 'src/favicon.ico'
        },
      ]),

Your build fix for Windows works perfectly, by the way, thanks so much!

from elm-webpack-starter.

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.