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

Create elm webcomponent #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ module.exports = {
appPath: resolveApp('.'),
appPublic: resolveApp('./public'),
appHtml: resolveApp('./public/index.html'),
appIndexJs: resolveApp('./src/index.js'),
appIndexJs: resolveApp('./src/custom-element.js'),
appSrc: resolveApp('./src'),
dotenv: resolveApp('./.env'),
entry: resolveApp('./src/index.js'),
entry: resolveApp('./src/custom-element.js'),
appBuild: resolveApp('./build'),
elmJson: resolveApp('./elm.json'),
elm: require.resolve('elm/bin/elm'),
Expand Down
18 changes: 11 additions & 7 deletions config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ module.exports = {
// Generated JS file names (with nested folders).
// There will be one main bundle, and one file per asynchronous chunk.
// We don't currently advertise code splitting but Webpack supports it.
filename: 'static/js/[name].[chunkhash:8].js',
chunkFilename: 'static/js/[name].[chunkhash:8].chunk.js',
filename: 'static/js/custom-element.js',
chunkFilename: 'static/js/custom-element.chunk.js',
// We inferred the "public path" (such as / or /my-project) from homepage.
publicPath: publicPath,
// Point sourcemap entries to original disk location (format as URL on Windows)
Expand Down Expand Up @@ -111,12 +111,12 @@ module.exports = {
],
// Automatically split vendor and commons
// https://twitter.com/wSokra/status/969633336732905474
splitChunks: {
chunks: 'all'
},
// splitChunks: {
// chunks: 'all'
// },
// Keep the runtime chunk seperated to enable long term caching
// https://twitter.com/wSokra/status/969679223278505985
runtimeChunk: true
// runtimeChunk: true
},
resolve: {
modules: ['node_modules'],
Expand All @@ -137,6 +137,7 @@ module.exports = {
presets: [
[
require.resolve('@babel/preset-env'),
// ["env", { "targets": { "chrome": 52 }}],
{
// `entry` transforms `@babel/polyfill` into individual requires for
// the targeted browsers. This is safer than `usage` which performs
Expand Down Expand Up @@ -226,7 +227,10 @@ module.exports = {
test: /\.css$/,
exclude: /\.module\.css$/,
use: [
MiniCssExtractPlugin.loader,
// MiniCssExtractPlugin.loader,
{
loader: require.resolve('to-string-loader')
},
{
loader: require.resolve('css-loader'),
options: {
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "create-elm-app",
"name": "create-elm-webcomponent",
"description": "Elm apps with zero configuration",
"version": "0.0.0-development",
"version": "1.0.0",
"author": "Eduard Kyvenko <eduard.kyvenko@gmail.com>",
"bin": {
"elm-app": "./bin/elm-app-cli.js",
"create-elm-app": "./bin/create-elm-app-cli.js"
"elm-webcomponent": "./bin/elm-app-cli.js",
"create-elm-webcomponent": "./bin/create-elm-app-cli.js"
},
"bugs": {
"url": "https://github.com/halfzebra/create-elm-app/issues",
"email": "eduard.kyvenko@gmail.com"
"url": "https://github.com/1602/create-elm-app/issues",
"email": "rpm1602@gmail.com"
},
"config": {
"commitizen": {
Expand Down Expand Up @@ -53,6 +53,7 @@
"string-replace-loader": "^2.1.1",
"style-loader": "^0.21.0",
"sw-precache-webpack-plugin": "^0.11.5",
"to-string-loader": "^1.1.5",
"uglifyjs-webpack-plugin": "^1.2.4",
"url-loader": "^1.0.1",
"webpack": "^4.2.0",
Expand Down