I've got a bit strange issue when i'm trying to create a build and hardly understand what's a reason and how to solve it. The issue appears if i'm using dynamic import, for example:
import('./../Application/index.vue').catch(e => alert(e))
I'm revcieving the error
Error: Cannot find module '209'
25eef25dd6d82b322c9283ece5115b27.js:752 Uncaught (in promise) TypeError: Cannot read property '__esModule' of undefined
at Ke (25eef25dd6d82b322c9283ece5115b27.js:752)
at 25eef25dd6d82b322c9283ece5115b27.js:752
at 25eef25dd6d82b322c9283ece5115b27.js:752
at
There's an interesting thing,
If i run parcel index.html --no-cache then everyhing work correct
However if i do parcel build index.html --public-url ./ --out-dir www --no-cache the error described above appears. I'll be thankful for any hints.
Thank you.
PS. If instead of dynamic import use usual import, then it works in build too.
"use strict";
// JS
import 'babel-polyfill';
import Vue from 'vue';
// Import Index component
import Index from './components/Index/index.vue';
const application = new Vue({
render: h => h(Index),
});
application.$mount('#application');
Hello,
I've got a bit strange issue when i'm trying to create a
build
and hardly understand what's a reason and how to solve it. The issue appears if i'm using dynamic import, for example:import('./../Application/index.vue').catch(e => alert(e))
I'm revcieving the errorThere's an interesting thing, If i run
parcel index.html --no-cache
then everyhing work correct However if i doparcel build index.html --public-url ./ --out-dir www --no-cache
the error described above appears. I'll be thankful for any hints. Thank you.PS. If instead of dynamic import use usual import, then it works in
build
too.In my
package.json
in
index.html
in
index.js
in
components/Index/index.vue