simonh1000 / elm-webpack-starter Goto Github PK
View Code? Open in Web Editor NEWElm 0.19.1, Webpack 5 & Tailwind
License: MIT License
Elm 0.19.1, Webpack 5 & Tailwind
License: MIT License
I'm somewhat of a beginner but how would I use ports in dev with this? I notice that the webpack html plugin injects the script into the body but with ports it seems you need something like var app = Elm.Main.Fullscreen
and then app.ports.myPort...
First and foremost, thank you for your very useful repository
It helped me to enter at high speed in elm coolness, I'm very grateful.
I recently discovered Gitpod; the service is amazing!
What do you think about adding gitpod yml configuration?
Best!
Hi. Thanks for sharing this. I noticed in your webpack.config.js you have:
add: (app, middleware, options) => {
app.use(history());
}
Unless I'm missing something, this doesn't seem to work for loading specific routes because it doesn't root the index.js file at "/", i.e. you get this in the console:
Try to navigate to: http://localhost:3000/profile/bob
HTML output script tag: <script type="text/javascript" src="index.js"></script>
Console error: GET http://localhost:3000/profile/index.js 404 (Not Found)
As you can see, it's because it's referring to "index.js" from /profile/bob instead of "/index.js"
Is this something you're aware of, or am I missing something? It's possible I'm missing some of your code as well, as I didn't keep 100% of it.
For now I've resorted to removing inject: "body"
and hardcoding the script tag inclusion in my index.html in the body section.
Hi @simonh1000 , really great project. It just worked out of the box for me and I would really like to use it as the basis for my next project.
I noticed in the package.json
it specifies an MIT license. Would you consider adding a LICENSE
file to the project to make this more explicit?
Hello,
I was going through the package.json
file to understand the dependencies and there are a couple of questions I had. Maybe there will be people sharing the same questions:
I don't see the chokidar-cli
dependency being used explicitly by webpack or the code. My understanding from what it says in its README is that webpack will use it if available, right?
I see a postcss-loader
but I don't see it used explicitly either. Is any other loader using that under the hood?
Hi Simon, just a basic question for you, wondering what the rationale was behind having your "resolve" object point to the src/ directory instead of just having it default to the project root. Is there a specific reason for this, or was it just aesthetics (you liked having source code in src/). Thanks.
Had to change to:
new CleanWebpackPlugin({
root: __dirname,
exclude: [],
verbose: true,
dry: false
}),
because of error message in build otherwise (you don't need to pass ['dist'] anymore, apparently).
Hi!
Thank you for your work. I think this is a great starting point for a Webpack-based Elm app!
I see that the Babel core version in the package.json
file is still ^6.x.x
, which is confusing because the Readme file states that Babel 7 is used for JS transpilation.
Am I missing something or is this a mistake?
I can help with the Babel 7 upgrade if you wish.
Thank you.
Heya @simonh1000 -- Just noticed there's a missing exclude line here (no elm-stuff and node_modules exclude):
https://github.com/simonh1000/elm-webpack-starter/blob/master/webpack.config.js#L73
Just wondering if this was intended?
Thanks!
This is not really an issue, more like an enhancement request.
How would one add elmx-webpack-preloader
to the webpack config? I gave up after numerous attempts. Would there be a way to have .elmx
support in this great boilerplate project?
When running
$ npm run prod
one would expect the .css
assets to be minified, but mini-css-extract-plugin
does not minify the .css
.
The optimize-css-assets-webpack-plugin
(https://github.com/NMFR/optimize-css-assets-webpack-plugin) can be used as described in
https://webpack.js.org/plugins/mini-css-extract-plugin/#minimizing-for-production.
Great starter template... but... If you can't test it, don't build it
...so a decent template should include a setup for tests.
Hi! It would be great if you could use Github's new «Mark as template» feature to make it even easier to re-use this repo. You can read all about that at this link: https://github.blog/2019-06-06-generate-new-repositories-with-repository-templates/ Thanks in advance!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.