diff --git a/config/paths.js b/config/paths.js index d1a0508f..0c779419 100644 --- a/config/paths.js +++ b/config/paths.js @@ -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'), diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index 4e3b7739..9fa50fbb 100644 --- a/config/webpack.config.prod.js +++ b/config/webpack.config.prod.js @@ -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) @@ -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'], @@ -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 @@ -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: { diff --git a/package.json b/package.json index 2d753c26..ed525ab9 100644 --- a/package.json +++ b/package.json @@ -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 ", "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": { @@ -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",