Skip to content

Commit

Permalink
Restore using .js extension for better tools compatibility (#157)
Browse files Browse the repository at this point in the history
* Restore using .js extension for better tools compatibility
  • Loading branch information
web-padawan authored Jun 12, 2018
1 parent 30fa391 commit f638c90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.2",
"description": "Small and powerful client-side router for Web Components. Framework-agnostic.",
"main": "dist/vaadin-router.umd.js",
"browser": "dist/vaadin-router.mjs",
"browser": "dist/vaadin-router.js",
"repository": "vaadin/vaadin-router",
"keywords": [
"Vaadin",
Expand All @@ -30,7 +30,7 @@
"lint:css": "stylelint demo/**/*.html",
"build": "rollup -c && npm-run-all --parallel build:minify.*",
"build:minify.module": "uglifyjs dist/vaadin-router.umd.js -c -m --mangle-props regex=/^__/ --source-map --output dist/vaadin-router.umd.min.js",
"build:minify.browser": "uglifyjs dist/vaadin-router.mjs -c -m --mangle-props regex=/^__/ --toplevel --source-map --output dist/vaadin-router.min.mjs",
"build:minify.browser": "uglifyjs dist/vaadin-router.js -c -m --mangle-props regex=/^__/ --toplevel --source-map --output dist/vaadin-router.min.js",
"build:watch": "rollup -c -w",
"start": "npm run build && polyserve --port 8000",
"start:browser-sync": "browser-sync start --config bs-config.js",
Expand All @@ -44,7 +44,7 @@
},
"bundlesize": [
{
"path": "dist/vaadin-router.min.mjs",
"path": "dist/vaadin-router.min.js",
"maxSize": "6 kB"
}
],
Expand Down
13 changes: 0 additions & 13 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,6 @@ const config = [
plugins
},

// ES module bundle, not transpiled (for the API docs generation)
// FIXME: remove once polymer-cli adds `.mjs` file extension support
// See https://github.com/Polymer/tools/issues/415
{
input: 'index.js',
output: {
format: 'es',
file: pkg.browser.replace('.mjs', '.js'),
sourcemap: true,
},
plugins
},

// UMD bundle, transpiled (for the browsers that do not support ES modules).
// Also works in Node.
{
Expand Down

0 comments on commit f638c90

Please sign in to comment.