You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// ..._pageChanged(page){// Import the page component on demand.//// Note: `polymer build` doesn't like string concatenation in the import// statement, so break it up.switch(page){case'view1':
import('./my-view1.js');break;case'view2':
import('./my-view2.js');break;case'view3':
import('./my-view3.js');break;case'view404':
import('./my-view404.js');break;}}
This bit of code is from the Polymer 3.x starter-kit.
import('./my-view1.js');
brackets-beautify inserts a space
import ('./my-view1.js');
which causes the following error
PS C:\Users\skinn\local\src\davsk.net\website> polymer build
info: [cli.command.build] Clearing build\ directory...
error: [cli.main] Promise rejection: Error: 'import' and 'export' may only appear at the top level
error: [cli.main] Error: 'import' and 'export' may only appear at the top level
at error (C:\Users\skinn\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\rollup\dist\rollup.js:199:15)
at Module.error (C:\Users\skinn\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\rollup\dist\rollup.js:1694
7:9)
at tryParse (C:\Users\skinn\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\rollup\dist\rollup.js:16625:16
)
at Module.setSource (C:\Users\skinn\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\rollup\dist\rollup.js:
16689:33)
at C:\Users\skinn\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\rollup\dist\rollup.js:20589:20
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Environment
OS: Win10 Pro
Settings
The text was updated successfully, but these errors were encountered:
I tried to edit a file with beautify on save turn on and disaster
https://github.com/davsk/website/blob/master/src/my-app.js
I am using:
This bit of code is from the Polymer 3.x starter-kit.
brackets-beautify inserts a space
which causes the following error
Environment
OS: Win10 Pro
Settings
The text was updated successfully, but these errors were encountered: